Decentralized peer-to-peer advertisement

ABSTRACT

Embodiments of a shared resource distributed index mechanism that peers in a peer-to-peer network may utilize to distribute index entries corresponding to resources to indexes of shared resources among one or more other peers. These indexes may be used to direct queries to peers where the queries are most likely to be answered. When a query is received by a rendezvous peer including one or more indexes, contents of the query may be “looked up” in the index to find matches. The results of the lookup may include information on one or peer(s) that may hold advertisement(s) to the resource requested by the query. The query may then be forwarded to one or more peers that may hold the advertisement for the resource. Embodiments may provide “loosely-coupled” distribution of index entries for use in querying for resources in the peer-to-peer network.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] This invention relates to peer-to-peer networking, and moreparticularly to a decentralized resource advertisement and queryingmechanism for peer-to-peer networks.

[0003] 2. Description of the Related Art

[0004] The Internet has three valuable fundamental assets—information,bandwidth, and computing resources—all of which are vastlyunderutilized, partly due to the traditional client-server computingmodel. No single search engine or portal can locate and catalog theever-increasing amount of information on the Web in a timely way.Moreover, a huge amount of information is transient and not subject tocapture by techniques such as Web crawling. For example, research hasestimated that the world produces two exabytes or about 2×10¹⁸ bytes ofinformation every year, but only publishes about 300 terabytes or about3×10¹² bytes. In other words, for every megabyte of informationproduced, only one byte is published. Moreover, Google claims that itsearches about only 1.3×10{circumflex over ( )}8 web pages. Thus,finding useful information in real time is increasingly difficult.

[0005] Although miles of new fiber have been installed, the newbandwidth gets little use if everyone goes to one site for content andto another site for auctions. Instead, hot spots just get hotter whilecold pipes remain cold. This is partly why most people still feel thecongestion over the Internet while a single fiber's bandwidth hasincreased by a factor of 10{circumflex over ( )}6 since 1975, doublingevery 16 months.

[0006] New processors and storage devices continue to break records inspeed and capacity, supporting more powerful end devices throughout thenetwork. However, computation continues to accumulate around datacenters, which have to increase their workloads at a crippling pace,thus putting immense pressure on space and power consumption.

[0007] Finally, computer users in general are accustomed to computersystems that are deterministic and synchronous in nature, and think ofsuch a structure as the norm. For example, when a browser issues a URL(Uniform Resource Locator) request for a Web page, the output istypically expected to appear shortly afterwards. It is also typicallyexpected that everyone around the world will be able to retrieve thesame page from the same Web server using the same URL.

[0008] The term peer-to-peer networking or computing (often referred toas P2P) may be applied to a wide range of technologies that greatlyincrease the utilization of information, bandwidth, and computingresources in the Internet. Frequently, these P2P technologies adopt anetwork-based computing style that neither excludes nor inherentlydepends on centralized control points. Apart from improving theperformance of information discovery, content delivery, and informationprocessing, such a style also can enhance the overall reliability andfault-tolerance of computing systems.

[0009] Peer-to-peer (P2P) computing, embodied by applications likeNapster, Gnutella, and Freenet, has offered a compelling and intuitiveway for Internet users to find and share resources directly with eachother, often without requiring a central authority or server. As much asthese diverse applications have broken new ground, they typicallyaddress only a single function, run primarily only on a single platform,and are unable to directly share data with other, similar applications.

[0010] Many peer-to-peer systems are built for delivering a single typeof service. For example, Napster provides music file sharing, Gnutellaprovides generic file sharing, and AIM provides instant messaging. Giventhe diverse characteristics of these services and the lack of a commonunderlying P2P infrastructure, each P2P software vendor tends to createincompatible systems—none of them able to interoperate with one another.This means each vendor creates its own P2P user community, duplicatingefforts in creating software and system primitives commonly used by allP2P systems. Moreover, for a peer to participate in multiple communitiesorganized by different P2P implementations, the peer must supportmultiple implementations, each for a distinct P2P system or community,and serve as the aggregation point.

[0011] Many P2P systems today offer their features or services through aset of APIs that are delivered on a particular operating system using aspecific networking protocol. For example, one system might offer a setof C++ APIs, with the system initially running only on Windows, overTCP/IP, while another system offers a combination and C and Java APIs,running on a variety of UNIX systems, over TCP/IP but also requiringHTTP. A P2P developer is then forced to choose which set of APIs toprogram to, and consequently, which set of P2P customers to target.Because there is little hope that the two systems will interoperate, ifthe developer wants to offer the same service to both communities, theyhave to develop the same service twice for two P2P platforms or developa bridge system between them. Both approaches are inefficient andimpractical considering the dozens of P2P platforms in existence.

[0012] Many P2P systems, especially those being offered by upstartcompanies, tend to choose one operating system as their targetdeployment platform. The cited reason for this choice is to target thelargest installed base and the fastest path to profit. The inevitableresult is that many dependencies on platform-specific features aredesigned into (or just creep into) the system. This is often not theconsequence of technical desire but of engineering reality with itstight schedules and limited resources.

[0013] This approach is clearly shortsighted. Even though the earliestdemonstration of P2P capabilities are on platforms in the middle of thecomputing hardware spectrum, it is very likely that the greatestproliferation of P2P technology will occur at the two ends of thespectrum—large systems in the enterprise and consumer-oriented smallsystems. In fact, betting on any particular segment of the hardware orsoftware system is not future proof.

[0014]FIGS. 1A and 1B are examples illustrating the peer-to-peer model.FIG. 1A shows two peer devices 104A and 104B that are currentlyconnected. Either of the two peer devices 104 may serve as a client ofor a server to the other device. FIG. 1B shows several peer devices 104connected over the network 106 in a peer group. In the peer group, anyof the peer devices 104 may serve as a client of or a server to any ofthe other devices.

[0015] Prior art peer-to-peer systems are generally built for deliveringa single type of service, for example a music file sharing service, ageneric file sharing service, or an instant messaging service. Given thediverse characteristics of these services and given the lack of a commonunderlying peer-to-peer infrastructure, each vendor tends to formvarious peer-to-peer “silos.” In other words, the prior art peer-to-peersystems typically do not interoperate with each other. This means eachvendor has to create its own peer-to-peer user community, duplicatingefforts in creating primitives commonly used by peer-to-peer systemssuch as peer discovery and peer communication.

[0016] Discovery in a peer-to-peer environment may be based oncentralized discovery with a centralized index. This method is used bysuch peer-to-peer applications as Napster and AIM. Discovery based on acentralized index may be efficient, deterministic, and well suited for astatic environment. Such a method of discovery may also providecentralized control, provide a central point of failure, and provideeasy denial of services. However, such a method of discovery may beexpensive to scale and may degrade with aging.

[0017] Discovery in a peer-to-peer environment may also be based on netcrawling. This method is used by such peer-to-peer applications asGnutella and FreeNet. Discovery based on net crawling may be simple,adaptive, deterministic, inexpensive to scale, well suited for a dynamicenvironment, and may be difficult to attack. Such a method of discoverymay also improve with aging. However, such a method of discovery mayprovide slower discovery than centralized control.

[0018] In a peer-to-peer environment, assume there is a peer-to-peercommunity offering a search capability for its members, where one membercan post a query and other members can hear and respond to the query.One member is a Napster user and has implemented a feature so that,whenever a query is received seeking an MP3 file, this member will lookup the Napster directory and then respond to the query with informationreturned by the Napster system. Here, a member without any knowledge ofNapster may benefit because another member implemented a bridge toconnect their peer-to-peer system to Napster. This type of bridging isvery useful, but when the number of services is large, pair-wisebridging becomes more difficult and undesirable. Thus, it may bedesirable to provide a platform bridge that may be used to connectvarious peer-to-peer systems together.

[0019] In another example, one engineering group requires a sizablestorage capability, but also with redundancy to protect data from suddenloss. A common solution is to purchase a storage system with a largecapacity and mirrored disks. Another engineering group later decides topurchase the same system. Both groups end up with a lot of extracapacity, and have to pay higher prices for the mirroring feature. Thus,it may be desirable to provide a mechanism by which each group may buy asimple storage system without the mirroring feature, where the disks canthen discover each other automatically, form a storage peer group, andoffer mirroring facilities using their spare capacity.

[0020] As yet another example, many devices such as cell phones, pagers,wireless email devices, Personal Digital Assistants (PDAs), and PersonalComputers (PCs) may carry directory and calendar information. Currently,synchronization among the directory and calendar information on thesedevices is very tedious, if not impossible. Often, a PC becomes thecentral synchronization point, where every other device has to figureout a way to connect to the PC (using serial port, parallel port, IrDA,or other method) and the PC must have the device driver for every devicethat wishes to connect. Thus, it may be desirable to provide a mechanismby which these devices may interact with each other, without extranetworking interfaces except those needed by the devices themselves,utilizing a common layer of communication and data exchange.

SUMMARY OF THE INVENTION

[0021] Embodiments of a shared resource distributed index mechanism thatpeers in a peer-to-peer network may utilize to distribute index entriescorresponding to resources (e.g. software modules such as services andapplications, peers, peer groups, pipes, etc) to indexes of sharedresources among one or more other peers, for example rendezvous peers,are described. These indexes may be used to direct queries in thedirection where the queries are most likely to be answered. When a queryis received by a rendezvous peer including one or more indexes, contentsof the query may be “looked up” in the index(es) to find matches. Theresults of the lookup may include information on one or peer(s) that mayhold advertisement(s) to the resource requested by the query. The querymay then be forwarded to one or more peers that may hold theadvertisement for the resource as indicated by the lookup results.Embodiments of the shared resource distributed index mechanism mayprovide “loosely-coupled” distribution of index entries for use inquerying for resources in a peer-to-peer network. In loosely-coupleddistribution, a peer may send index entries to another peer, but theseindex entries are not (necessarily) replicated to other peers in thepeer-to-peer network.

[0022] In one embodiment, peer-to-peer platform services that exposeresources may share (e.g. upload) one or more key/value pairs for theresources (e.g. elements of resource advertisements) which they desireto advertise, for example with a rendezvous peer on initial connectionto the rendezvous peer. The rendezvous peer may store these key/valuepairs in one or more indexes. In one embodiment, the index(es) may behash tables, and the key/value pairs may be hashed and stored in theindex(es). In one embodiment, deltas to the list of key/value pairs maybe uploaded (or included in a query) to the rendezvous peer to updatethe index(es) of key/value pairs. In one embodiment, a rendezvous peermay leverage the mechanism of its relationship with a peer to garbagecollect indexes/hashes when the peer severs the session with therendezvous peer.

[0023] In one embodiment, advertisements for peer-to-peer resources mayinclude one or more elements or fields. Each element may be a key/valuepairs including a key (identifying the element) and a value for theelement. Advertisements may be indexed on one or more of these key/valuepairs. One or more of an advertisement's elements (key/value pairs) maybe distributed to other peers (e.g. rendezvous peers) and added toindexes to be used for query routing and/or peer addressing. Thus,instead of (or alternatively in addition to) publishing an advertisementfor a resource, a peer may distribute key/value pairs for the resourceto one or more other peers.

[0024] A query may include one or more key/value pairs that may becompared against one or more indexes of available key/value pairs. Whena peer receives a query requesting an advertisement to a particularresource, the query includes one or more key/value pairs associated withthe resource advertisement. The key/value pair(s) may be searched for(i.e. a lookup is performed) in one or more indexes on the receivingpeer (e.g. rendezvous peer) and, if a match or matches are found, thequery request may be routed to the one or more peers which may includeadvertisement(s) indicated by the match(es) in the one or more indexes.In one embodiment, the results of a lookup in an index may beinformation identifying the peer(s) that may include the advertisementfor the desired resource. In one embodiment, the results may be peeridentifier(s) that identify the one or more peers that may include theadvertisement.

[0025] In one embodiment, the indexes may be hash tables that includehashes of key/value pairs. In this embodiment, when a query is received,the key/value pair(s) from the query may be hashed and compared againstthe one or more indexes of available hashed key/value pairs. If a match(or matches) is found in the hash table, the query may be forwarded tothe peer(s) where the query's key/value pair(s) matches an entry in theindex(es).

BRIEF DESCRIPTION OF THE DRAWINGS

[0026]FIG. 1A illustrates a prior art example of two devices that arecurrently connected as peers;

[0027]FIG. 1B illustrates a prior art example of several peer devicesconnected over the network in a peer group;

[0028]FIG. 2 illustrates one embodiment of peer-to-peer platformsoftware architecture at the conceptual level;

[0029]FIG. 3 illustrates an exemplary content identifier according toone embodiment;

[0030]FIG. 4 illustrates a point-to-point pipe connection between peersaccording to one embodiment;

[0031]FIG. 5 illustrates a peer-to-peer platform message formataccording to one embodiment;

[0032]FIG. 6 illustrates the content of a peer advertisement accordingto one embodiment;

[0033]FIG. 7 illustrates the content of a peer group advertisementaccording to one embodiment;

[0034]FIG. 8 illustrates the content of a pipe advertisement accordingto one embodiment;

[0035]FIG. 9 illustrates the content of a service advertisementaccording to one embodiment;

[0036]FIG. 10 illustrates the content of a content advertisementaccording to one embodiment;

[0037]FIG. 11 illustrates the content of an endpoint advertisementaccording to one embodiment;

[0038]FIG. 12 illustrates protocols and bindings in a peer-to-peerplatform according to one embodiment;

[0039]FIG. 13 illustrates discovery through a rendezvous proxy accordingto one embodiment;

[0040]FIG. 14 illustrates discovery through propagate proxies accordingto one embodiment;

[0041]FIG. 15 illustrates using messages to discover advertisementsaccording to one embodiment;

[0042]FIG. 16 illustrates one embodiment of using peer resolver protocolmessages between a requesting peer and a responding peer;

[0043]FIG. 17 illustrates one embodiment of using peer informationprotocol messages between a requesting peer and a responding peer;

[0044]FIG. 18 illustrates several core components and how they interactfor discovery and routing according to one embodiment;

[0045]FIG. 19 illustrates one embodiment of message routing in apeer-to-peer network that uses the peer-to-peer platform;

[0046]FIG. 20 illustrates traversing a firewall in a virtual privatenetwork when access is initiated from outside only according to oneembodiment;

[0047]FIG. 21 illustrates email exchange through an email gatewayaccording to one embodiment;

[0048]FIG. 22 illustrates traversing a firewall when access is initiatedfrom the inside according to one embodiment;

[0049]FIG. 23 illustrates embodiments of a peer-to-peer platform proxyservice, and shows various aspects of the operation of the proxyservice;

[0050]FIG. 24 illustrates a method of using a proxy service for peergroup registration according to one embodiment;

[0051]FIG. 25 illustrates peer group registration across a firewallaccording to one embodiment;

[0052]FIG. 26 illustrates a method of providing peer group membershipthrough a proxy service according to one embodiment;

[0053]FIGS. 27A and 27B illustrate a method of providing privacy in thepeer-to-peer platform according to one embodiment;

[0054]FIGS. 28A and 28B illustrate one embodiment of a method for usinga peer-to-peer platform proxy service as a certificate authority;

[0055]FIG. 29A illustrates a peer in a peer-to-peer network publishingan advertisement according to one embodiment;

[0056]FIG. 29B illustrates a peer in a peer-to-peer network publishingan advertisement to a rendezvous peer according to one embodiment;

[0057]FIG. 30 illustrates discovering advertisements according to oneembodiment;

[0058]FIG. 31 illustrates a tiered architecture for abstracting softwaremodules according to one embodiment;

[0059]FIG. 32 illustrates a tiered architecture for abstracting softwaremodules according to another embodiment;

[0060]FIG. 33 illustrates a module class advertisement, a modulespecification advertisement, and a module implementation advertisementfor a software module according to one embodiment;

[0061]FIG. 34A illustrates a peer including an advertisement for aresource sending an index entry for the resource to a rendezvous peeraccording to one embodiment;

[0062]FIG. 34B illustrates a peer querying for a resource according toone embodiment;

[0063]FIG. 34C illustrates a rendezvous peer routing a query to a peerthat may be able to satisfy the query according to one embodiment;

[0064]FIG. 34D illustrates a peer to which a query was routed by arendezvous peer responding to the query according to one embodiment;

[0065]FIG. 35 is a flowchart illustrating a peer sending index entriesfor resource advertisement(s) to a rendezvous peer according to oneembodiment;

[0066]FIG. 36 is a flowchart illustrating a peer querying for a resourceusing key/value pairs according to one embodiment; and

[0067]FIG. 37 illustrates a method for resolving queries in apeer-to-peer network according to one embodiment.

[0068] While the invention is described herein by way of example forseveral embodiments and illustrative drawings, those skilled in the artwill recognize that the invention is not limited to the embodiments ordrawings described. It should be understood, that the drawings anddetailed description thereto are not intended to limit the invention tothe particular form disclosed, but on the contrary, the intention is tocover all modifications, equivalents and alternatives falling within thespirit and scope of the present invention as defined by the appendedclaims. The headings used herein are for organizational purposes onlyand are not meant to be used to limit the scope of the description orthe claims. As used throughout this application, the word “may” is usedin a permissive sense (i.e., meaning having the potential to), ratherthan the mandatory sense (i.e., meaning must). Similarly, the words“include”, “including”, and “includes” mean including, but not limitedto.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

[0069] Embodiments of an open network computing platform designed forpeer-to-peer computing are described. The network computing platform maybe referred to as a peer-to-peer platform. The peer-to-peer platform maybe used to build a wide range of distributed services and applicationsin which every device is addressable as a peer, and where peers canbridge from one domain into another. The peer-to-peer platform mayenable developers to focus on their own application development whileeasily creating distributed computing software that is flexible,interoperable, and available on any peer on the expanded Web. Thepeer-to-peer platform may enable software developers to deployinteroperable services and content, further spring-boarding thepeer-to-peer revolution on the Internet. The peer-to-peer platformaddresses the problems of prior art peer-to-peer systems by providing ageneric and service-agnostic peer-to-peer platform that may bepreferably defined by a small number of protocols. Each protocol ispreferably easy to implement and easy to be adopted into peer-to-peerservices and applications. Thus, service offerings from one vendor maybe used, perhaps transparently, by the user community of anothervendor's system.

[0070] The peer-to-peer platform extends P2P computing to enable a widerange of distributed computing applications and overcome the limitationstypically found in prior art P2P applications. The peer-to-peer platformis a network computing technology that provides a set of simple, small,and flexible mechanisms that can support P2P computing on any platform,anywhere, and at any time. The peer-to-peer platform generalizes P2Pfunctionality and provides core technology that addresses thelimitations of prior art P2P computing technologies.

[0071] The peer-to-peer platform is a modular platform that providessimple and essential building blocks for developing a wide range ofdistributed services and applications. The peer-to-peer platformspecifies a set of protocols rather than an API. Thus, the peer-to-peerplatform can be implemented in any language on any Operating System toprovide solutions ranging from providing a simple protocol-based wrapperthat enables a small device to join a network of peers to developing afully integrated application that supports metering, monitoring,high-level security and communication across server-class systems.

[0072] In one embodiment, the peer-to-peer platform architecture mayinclude, but is not limited to, protocols, advertisements, and coreservices. Network protocol bindings may be used to preferably ensureinteroperability with existing content transfer protocols, networktransports, routers, and firewalls. The peer-to-peer platform may beused to combine network nodes (peers) into a simple and coherentpeer-to-peer network computing platform. Embodiments the peer-to-peerplatform may be directed at providing several benefits including one ormore of, but not limited to, no single point of failure, asynchronousmessaging, the ability for peers to adapt to their network environment,and moving content towards its consumers.

[0073]FIG. 2 illustrates one embodiment of peer-to-peer platformsoftware architecture at the conceptual level. The peer-to-peer platformmay include several layers. In one embodiment, the software stack may bedescribed using three layers; a peer-to-peer platform (core) layer 120,a service layer 140 and an application layer 150. In one embodiment, thepeer-to-peer platform may include a core layer 120 that defines andencapsulates minimal primitives that are common to peer-to-peernetworking, including, but not limited to, peers 110, peer groups 122,peer discovery 124, peer communication (e.g. pipes) 126, peer monitoring128, and associated security primitives 130. This layer may be shared byall peer-to-peer devices so that interoperability becomes possible.

[0074] A peer may be defined as any entity that runs some or all of oneor more protocols provided by the peer-to-peer platform core layer. Assuch, a peer may manifest in the form of a processor, a process or adevice. A peer may be anything with a digital heartbeat that supportsthe peer-to-peer platform core, including sensors, servers, PCs,computers up to and including supercomputers, PDAs, manufacturing andmedical equipment, phones and cellular phones. In order to interact withother peers (e.g. to form or join peer groups), the peer needs to beconnected to some kind of network (wired or wireless), such as IP,Bluetooth, or Havi, among others.

[0075] The peer-to-peer platform may provide mechanisms through whichpeers may discover each other, communicate with each other, andcooperate with each other to form peer groups. Peers may discover eachother on the network to form transient or persistent relationshipscalled peer groups. A peer group is a collection of peers connected by anetwork that share a common set of interests and that have agreed upon acommon set of rules to publish, share and access any computer content(code, data, applications, or other collections of computerrepresentable resources), and communicate among themselves. Peer groupsmay also be statically predefined. The peers in a peer group maycooperate to provide a common set of services. A peer group may beviewed as an abstract region of the network, and may act as a virtualsubnet. The concept of a region virtualizes the notion of routers andfirewalls, subdividing the network in a self-organizing fashion withoutrespect to actual physical network boundaries. In one embodiment, peergroups implicitly define a region scope that may limit peer propagationrequests. Conceptually, a peer group may be viewed as a virtual entitythat speaks the set of peer group protocols.

[0076] The core layer 120 provides core support for peer-to-peerservices and applications. In a multi-platform, secure executionenvironment, the core mechanisms of peer groups, peer pipes and peermonitoring may be provided. Peer groups 122 may establish a set of peersand naming within a peer group with mechanisms to create policies forcreation and deletion, membership, advertising and discovery of otherpeer groups and peer nodes, communication, security, and contentsharing. Pipes provide virtual communication channels among peers.Messages sent in pipes may support transfer of data, content, and codein a protocol-independent manner, allowing a range of security,integrity, and privacy options. In one embodiment, messages may bestructured with a markup language such as XML. Peer monitoring 128enables control of the behavior and activity of peers in a peer groupand can be used to implement peer management functions including accesscontrol, priority setting, traffic metering, and bandwidth balancing.

[0077] The core layer 120 may include protocols and building blocks toenable key mechanisms for peer to peer networking, including discovery,transport (including firewall handling and limited security), and thecreation of peers and peer groups. In one embodiment, the core layer 120may be thin and small, and may provide interesting and powerfulprimitives for use by services and applications in the other layers. Thecore layer 120 may support choices such as anonymous vs. registeredusers and encrypted vs. clear text content without imposing specificpolicies on developers. Policy choices may be made, or when necessary,implemented, at the service layer 140 and/or application layer 150. Forexample, administration services such as accepting or rejecting a peer'smembership in a peer group may be implemented using the functionalityprovided by the core layer 120.

[0078] The core components of the peer-to-peer protocol may be used toimplement discovery mechanisms for searching, publishing and recoveringof core abstractions (e.g. peers, peer group, pipes, endpoints, andadvertisements). In one embodiment, these mechanisms may be simple,administration free, and may not require special peers to act as“master” peers. These mechanisms may allow processes in the peer-to-peernetwork, in absence of help from other applications and/or services, tobootstrap and find out the information necessary to access applicationsand services that can help. In addition, the core may “return” to thisstandalone behavior and still function if helper applications orservices fail. In one embodiment, safety mechanisms may be put in placein order to avoid a major overflow of “web-crawling.” In one embodiment,applications and/or services that support the peer-to-peer protocol mayaccess, control, and/or override the core components, even to theextreme of implementing a centralized, client-server model based on thecore components.

[0079] At the highest abstraction level, the peer-to-peer platform maybe viewed as a set of protocols provided at the core layer 120. In oneembodiment, a common thread among peer-to-peer platform peers isprotocols, not APIs or software implementations. In one embodiment, thepeer-to-peer platform protocols may guarantee interoperability betweencompliant software components executing on potentially heterogeneouspeer runtimes. Thus, embodiments of the peer-to-peer platform may beagnostic to programming languages. The term compliant may refer to asingle protocol only. That is some peers may not implement all the coreprotocols. Furthermore, some peers may only use a portion (client-sideor server-side only) of a protocol.

[0080] Each protocol may be defined by one or more messages exchangedamong participants of the protocol. Each message may have a predefinedformat, and may include various data fields. In one embodiment, theprotocols may utilize messaging such as XML messages. The peer-to-peerplatform connects peer nodes with each other. In one embodiment, thepeer-to-peer platform may be platform-independent by virtue of being aset of protocols. As such, the peer-to-peer platform may not requireAPIs and remains independent of programming languages, so that it can beimplemented in C/C++, Java, Java 2ME, Perl, Python or other languages.This means heterogeneous devices with completely different softwarestacks can preferably interoperate through the peer-to-peer platformprotocols. To underpin this set of protocols, the peer-to-peer platformmay define a number of concepts including peer, peer group,advertisement, message, pipe, and more.

[0081] In one embodiment, peer-to-peer protocols may be embodied asmarkup language (e.g. XML) messages that may be sent between two peers.In one embodiment, the peer-to-peer platform messages may define theprotocols used to discover and connect peers and peer groups, and toaccess resources offered by peers and peer groups, among others. The useof markup language (e.g. XML) messages to define protocols may allowmany different kinds of peers to participate in a protocol. Each peermay be free to implement the protocol in a manner best suited to itsabilities and role. For example, not all peers are capable of supportinga Java runtime environment. In one embodiment, the protocol definitiondoes not require nor imply the use of Java on a peer.

[0082] Several peer-to-peer platform protocols that may be provided byembodiments of the peer-to-peer platform are described later in thisdocument. The protocols defined in this document may be realized overnetworks including, but not limited to, the Internet, a corporateintranet, a dynamic proximity network, a home networking environment,LANs, and WANs. The protocols defined in this document may also berealized within a single computer. Thus, in one embodiment, thepeer-to-peer platform may be transport protocol independent. The sizeand complexity of the network peers that may support these protocolspreferably includes a wide range of peer implementations including peersimplemented on, but not limited to, simple light switches, PDAs, cellphones, pagers, laptop and notebook computers, smart appliances,personal computers, workstations, complex, highly-available servers,mainframe computers and even supercomputers.

[0083] The peer-to-peer platform may further include a peer-to-peerservices layer 140. This layer may provide capabilities that may not beabsolutely necessary for a peer-to-peer network to operate but that maybe desirable to provided added functionality beyond the core layer 120in the peer-to-peer environment. The service layer 140 may deal withhigher-level concepts such as search and indexing, directory, storagesystems, file sharing, distributed file systems, resource aggregationand renting, protocol translation, authentication and PKI (public keyinfrastructure) systems. These services, which may make use of theprotocols and building blocks provided by the core layer 120, may beuseful by themselves but also may be included as components in anoverall P2P system. Thus, services may include one or more services 144provided by the peer-to-peer platform. These platform-provided services144 may include indexing, searching and file sharing services, forexample. The services layer 140 may provide hooks for supporting genericservices (such as searching, sharing and added security) that are usedin many P2P applications. Thus, services may also include one or moreservices 142 not provided as part of the peer-to-peer platform butrather provided by the peer-to-peer platform community. These services142 may be user-defined and may be provided, for example, to memberpeers in a peer group as a peer group service.

[0084] Services may expand upon the capabilities of the core layer 120and may be used to facilitate application development. Facilitiesprovided as services in the service layer 140 may include mechanisms forsearch and indexing, directory, storage systems, file sharing,distributed file systems, resource aggregation and renting, protocoltranslation, authentication, PKI services, and caching code and contentto enable cross-application bridging and translation of files, amongothers. Searching capabilities may include distributed, parallelsearches across peer groups that are facilitated by matching an XMLrepresentation of a query to be processed with representations of theresponses that can be provided by each peer. These facilities may beused for simple searches, for example searching a peer's repository, ormore complex searches of dynamically generated content that isunreachable by conventional search engines. P2P searches may beconducted across a company's intranet, for example, to quickly locaterelevant information within a secure environment. By exercising tightcontrol over peer group membership and enabling encrypted communicationbetween peers, a company may extend this capability to its extranet,including business partners, consultants, and suppliers as peers. Thesame mechanisms that facilitate searches across the peer group may beused as a bridge to incorporate Internet search results, and to includedata outside of the peer's own repository, for example searching apeer's disk. The peer services layer 140 may be used to support othercustom, application-specific functions. For example, a secure peermessaging system may be built to allow anonymous authorship and apersistent message store. The peer services layer 140 provides themechanisms to create such secure tools; the application developersthemselves may determine specific tool policies.

[0085] The peer-to-peer platform may also include a peer-to-peerapplication layer 150. The application layer 140 may support theimplementation of integrated applications such as file sharing, resourcesharing, monetary systems, distributed storage, peer-to-peer instantmessaging, entertainment, content management and delivery, peer-to-peeremail systems, distributed auction systems, among others. Applicationsmay be “vertical” or they may be developed to interoperate with otherdistributed applications. One or more applications 154 may be providedas part of the peer-to-peer platform. For example, one embodiment of thepeer-to-peer platform may include a shell application 160 as adevelopment environment built on top of the platform. The shellapplication may provide interactive access to the peer-to-peer platformvia a simple command line interface 162.

[0086] Applications may also include community applications 152 notprovided by the peer-to-peer platform. These community applications 152may be user-defined and may be provided, for example, to member peers ina peer group as a peer group application.

[0087] In one embodiment, the boundary between services and applicationsis not rigid. An application to one customer can be viewed as a serviceto another customer. An application may use services. Services may serveas protocols that may be shared among various applications. Anapplication may provide a user interface, a way to define a set of filesto share, a way to initiate a search, a way to display the results, anda way to initiate a file transfer, for example. Such an application maymake use of a set of services, for example a reliable point-to-pointfile transfer service, a distributed search service, a discovery serviceto locate other peers, among others.

[0088] Applications may be built using peer services as well as the corelayer 120. The peer-to-peer platform may support the fundamental levelsbroadly, and rely on the P2P development community to provide additionalpeer services and applications. Peer applications enabled by both thecore layer 120 and peer services layer 140 may include P2P auctions thatlink buyers and sellers directly, with buyers able to program theirbidding strategies using a simple scripting language, for example.Resource-sharing applications, such as SETI@home, may be built morequickly and easily, with heterogeneous, worldwide peer groups supportedfrom day one. Instant messaging, mail, and calendaring services mayfacilitate communication and collaboration within peer groups that aresecure and independent of service provider-hosted facilities. Virtuallyany other type of application may be build on top of the core layer 120and services layer 140.

[0089] Some features, such as security, may manifest in all three layersand throughout a P2P system, albeit in different forms according to thelocation in the software architecture. In one embodiment, the system maybe modular, and allows developers to pick and choose a collection ofservices and applications that suits their needs.

[0090] A typical peer-to-peer platform network may provide an inherentlynondeterministic topology/response structure. In a peer-to-peer platformnetwork, a specific resource request may not return for minutes, hours,or even days; in fact, it may never return at all. In addition, peoplefrom different parts of the world requesting the same resource arelikely to get different copies of the resource from completely differentlocations. Peers may obtain content from multiple servers, ideallyreaching a nearby one that is up and running. The original source peerneed not service every resource request; in fact, it does not even haveto be up and running. The nondeterministic structure may also helpprovide the optimized use of network bandwidth. The concentratedlocalized traffic congestion typical of today's Web doesn't affect P2Pnetworking. The nondeterministic structure may also help provide alowered cost of content distribution. The P2P network can absorbcontents and replicate it for easy access. The nondeterministicstructure may also help provide leveraged computing power from everynode in the network. With asynchronous operations, a user may issue manyrequests for many resources or services simultaneously and have thenetwork do the work. The nondeterministic structure may also helpprovide unlimited scalability. A properly designed P2P application mayspan the entire known connected universe without hitting scalabilitylimits; this is typically not possible with centralized schemes. Note,however, that the peer-to-peer platform also may support deterministic,synchronous applications.

[0091] As an example of a nondeterministic, asynchronous application,consider a network-based music request service that operates over apeer-to-peer platform-based P2P network. A peer submits multiplerequests for music files and then checks back later to see if the musicrequest service in the peer group has found them. A few requested fileshave been found, but others cannot be located. The service's response inregards to the files that cannot be located may be something like “Musicselection and availability changes continuously; please retry yourrequest later.” This is an acceptable nondeterministic outcome. Eventhough the service could not find a file, the same file may be availablelater if the same request is resubmitted, because peers that host thedesired files may have come online in the meantime.

[0092] The peer-to-peer platform provides the ability to replicateinformation toward end users. Popular content tends to be replicatedmore often, making it easier to find as more copies are available. Peersdo not have to always go back to the same peer to obtain the informationthey want, as is typical in the client/server model. Peers may obtaininformation from neighboring peers that have already cached theinformation. Each peer may become a provider to all other peers.

[0093] In one embodiment, the peer-to-peer platform may enable peers tofind content that is closest to them. This content may include data(e.g. files) or even services and applications. For example, if a peernode in an office peer-to-peer network using the peer-to-peer platformis moved, the peer-to-peer platform may allow the peer to automaticallylocate content (e.g. using a discovery service that participates in thediscovery protocol) including services (e.g. a printer service and anemail service) hosted by other peers closest to the peer's new location,without requiring any manual reconfiguration. Further, at least somecontent may be copied or moved to the peer in its new location and/or toother peers proximate to the new location.

[0094] In one embodiment, the peer-to-peer platform may provide adecentralized environment that minimizes single points of failure and isnot dependent on any centralized services. Both centralized anddecentralized services may be developed on top of the peer-to-peerplatform. With the addition of each new network peer, the networkplatform preferably becomes more robust as it expands. In theenvironment, services may be implemented to interoperate with otherservices giving rise to new P2P applications. For example, a P2Pcommunications service like instant messaging may easily be added to aresource-sharing P2P application if both support at least the necessarypeer-to-peer platform protocols.

[0095] The peer-to-peer platform may provide interoperability. Thepeer-to-peer platform may be used by developers independent of preferredprogramming languages, development environments, or deploymentplatforms. Embodiments of the peer-to-peer platform may enableinterconnected peers to easily locate each other, communicate with eachother, participate in community-based activities, and offer services toeach other seamlessly across different P2P systems and differentcommunities. The peer-to-peer platform may also provide platformindependence. Embodiments of the peer-to-peer platform may beindependent of programming languages (such as C/C++, Java, Perl, andKVM), system platforms (such as the Microsoft Windows, UNIX®, Solaris,Linux and Macintosh platforms), and networking platforms (such asTCP/IP, Bluetooth and Havi). Thus, heterogeneous devices with completelydifferent software stacks may interoperate through the peer-to-peerplatform protocols. Embodiments of the peer-to-peer platform may beimplementable on any device with a digital heartbeat, including, but notlimited to, sensors, consumer electronics, Personal Digital Assistants(PDAs), appliances, network routers, desktop computers, data-centerservers, and storage systems. Embodiments of the peer-to-peer platformmay enable peers, independent of software and hardware platform, tobenefit and profit from being connected to millions of other peers.

[0096] In one embodiment, the peer-to-peer platform may run on any ofvarious operating systems including embedded operating systems (with theappropriate level of Java runtime support, if required) such asWindows95, 98, 2000, ME, and NT, Solaris, Unix, Macintosh, Linux, Java 2Platform, Micro Edition (J2ME) and PersonalJava Technology. Thepeer-to-peer platform may be implemented in any of a variety ofdevelopment environments using any of a variety of programminglanguages, or combinations of programming languages, including, but notlimited to, Java, Java 2ME, C/C++, Perl, Python and KVM. In oneembodiment, the peer-to-peer platform may be implemented in Java. In oneembodiment, a peer-to-peer platform may be implemented in C/C++ on somedevices, for example, to support devices without Java support. In oneembodiment, a peer-to-peer platform may be implemented in KVM on somedevices, for example, so that all KVM capable devices such as PDAs andcell phones can be peer-to-peer platform peers. Programming languagesother than those listed may also be used in various embodiments.

[0097] A minimal device with the ability to generate a text string maytheoretically participate in a peer-to-peer platform network (though notnecessarily in every P2P application). The simplistic device may need asurrogate peer on the P2P network. This surrogate peer may performdiscovery, advertisement, and communications on behalf of the simplisticdevice (or many simplistic devices). The location of the surrogate maybe hard-wired into the simplistic device. In this way, the simplisticdevice with the help of the surrogate can be a full-fledged peer on thepeer-to-peer platform network. For example, a GPS locator, strapped to asea turtle and sending out peer-to-peer platform messages wirelesslywith location information, may become a peer on a peer-to-peer platformnetwork.

[0098] Embodiments of the peer-to-peer platform may be independent oftransport protocols. For example, the peer-to-peer platform may beimplemented on top of TCP/IP, HTTP, Bluetooth, HomePNA, and otherprotocols. Thus, a system built on top of the peer-to-peer platformpreferably functions in the same or similar fashion when the system isexpanded to a new networking environment or to a new class of devices,as long as there is a correct transport protocol handler for the newnetworking protocol.

[0099] In one embodiment, the peer-to-peer platform may use XML as theencoding format. XML may provide convenience in parsing andextensibility. Other embodiments of the peer-to-peer platform may useother encoding formats. The use of XML does not imply that allpeer-to-peer platform peer nodes must be able to parse and to create XMLdocuments. For example, a cell phone with limited resources may beprogrammed to recognize and to create certain canned XML messages andcan still participate in a peer-to-peer platform network of peers. Inone embodiment, a lightweight XML parser may be used that supports asubset of XML. This may help reduce the size of the peer-to-peerplatform.

[0100] There may be areas in a peer-to-peer environment where there isnot one correct way to do something or where what should be done dependson the nature and context of the overriding application. For example, inthe area of security, every P2P application may choose a differentauthentication scheme, a different way to ensure communication security,a different encryption algorithm for data security, a differentsignature scheme for authenticity, and a different access controlpolicy. Therefore, for these areas, the peer-to-peer platform maypreferably focus on mechanisms instead of policy, so that applicationdevelopers can have the maximum freedom to innovate and offercompetitive solutions.

[0101] Implementations of the peer-to-peer platform may be illustratedwith a few application or usage scenarios. For example, assume there isa peer-to-peer community offering a search capability for its members,where one member can post a query and other members can hear and respondto the query. One member is a Napster user and has implemented a featureso that, whenever a query is received seeking an MP3 file, this memberwill look up the Napster directory and then respond to the query withinformation returned by the Napster system. Here, a member without anyknowledge of Napster may benefit because another member implemented abridge to connect their peer-to-peer system to Napster. The peer-to-peerplatform may provide a platform bridge that may be used to connect thevarious peer-to-peer systems together.

[0102] In another example, one engineering group requires a sizablestorage capability, but also with redundancy to protect data from suddenloss. Using the peer-to-peer platform, each group may buy a simplestorage system without a mirroring feature, where the disks can thendiscover each other automatically, form a storage peer group, and offermirroring facilities using their spare capacity.

[0103] As yet another example, many devices such as cell phones, pagers,wireless email devices, Personal Digital Assistants (PDAs), and PersonalComputers (PCs) may carry directory and calendar information. Using thepeer-to-peer platform, these devices may be able to interact with eachother, without extra networking interfaces except those needed by thedevices themselves, using the peer-to-peer platform as the common layerof communication and data exchange.

[0104] Peer-to-Peer Platform Identifiers

[0105] In embodiments the peer-to-peer platform, peer-to-peer platformprotocols may need to refer to peers, peer groups, pipes and otherpeer-to-peer platform resources. In one embodiment, these references maybe presented in the protocols as peer-to-peer platform identifiers.Peer-to-peer platform identifiers may provide a mechanism for uniquelyidentifying specific peer groups, peers, pipes, contents and serviceinstances, among other resources. Peer-to-peer platform identifiers mayprovide unambiguous references to the various peer-to-peer platformentities. There may be several types of peer-to-peer platform entitieswhich may have peer-to-peer platform identifier types defined includingone or more of, but not limited to: peer groups, peers, pipes, content,module classes and module specifications.

[0106] In one embodiment, peer-to-peer platform identifiers may bepresented as Uniform Resource Names (URNs). URNs are a form of URI(Uniform Resource Identifier) that are intended to serve as persistent,location-independent, resource identifiers. Like other forms of URI,peer-to-peer platform identifiers are presented as text. Refer to IETFRFC 2141 for more information on URNs.

[0107] In one embodiment, a peer-to-peer platform identifier is astandard URN in the peer-to-peer platform identifier namespace.Peer-to-peer platform identifier URNs may be identified by a namespaceidentifier, for example “xxxx.” Each peer-to-peer platform identifierURN may also include an identifier format keyword. The identifier formatkeyword may indicate how the identifier was created and may allowpeer-to-peer platform bindings to extract additional information fromthe identifier. In one embodiment, peer-to-peer platform identifierformats may be defined to refer to resources both within peer-to-peerplatform and to bridge to other technologies. One embodiment may use theABNF syntax as defined in “IETF RFC 2234” as a format specification.

[0108] When peer-to-peer platform identifiers are used withinpeer-to-peer platform protocols, the identifiers may be manipulated astext string URIs. Operations available for URIs may include compare,resolve, and decompose. Peer-to-peer platform identifier URIs may becompared for equality as strings. Peer-to-peer platform identifier URIsmay also be resolved to the resource they reference. Peer-to-peerplatform identifier URIs may be decomposed and interpreted bypeer-to-peer platform bindings. To interpret a peer-to-peer platformidentifier, a peer-to-peer platform binding may support the identifierformat used by that peer-to-peer platform identifier. For manypeer-to-peer platform protocols and operations, it may not be necessaryto decompose the peer-to-peer platform identifiers.

[0109] In one embodiment, peer group identifiers may be used to refer topeer groups. In one embodiment, a peer group identifier may canonically,uniquely and unambiguously refer to a peer group. In one embodiment,other identifier formats may support this identifier type because theother identifier types may refer to the peer group to which they belong.

[0110] In one embodiment, peer identifiers may be used to refer topeers. In one embodiment, a peer identifier may canonically, uniquelyand unambiguously refer to a peer. If a peer-to-peer platform bindingrecognizes the identifier format, it may be able to extract a peer groupidentifier from a peer identifier. This peer group identifier identifiesthe peer group of which the peer is a member.

[0111] In one embodiment, codat identifiers may be used to refer tocodats. A codat identifier may canonically, uniquely and unambiguouslyrefer to a codat. In one embodiment, support for codat identifiers maybe optional. In one embodiment, if a peer-to-peer platform bindingrecognizes the codat identifier format, it should be able to extract apeer group identifier from a given codat identifier. This peer groupidentifier identifies the peer group to which the codat belongs.

[0112] The term “codat” as used herein refers to any computercontent—code, data, applications, or other collection of computerrepresentable resources. In one embodiment, the peer-to-peer protocolmay not distinguish among different types of resources that can bestored on a computer and shared among peers in a peer group. Examples ofcodat include text files, photographs, applets, executable files,serialized Java objects, SOAP messages, etc. Codats are the elementaryunit of information that is exchanged among peers. In this embodiment,given that codats may have arbitrary forms and properties, it may not beclear what sets of actions should be defined for them. In oneembodiment, the codats may carry or include definitions of how theyshould be accessed. Such codats are analogous to objects, which maydefine for themselves access methods others can invoke.

[0113] In one embodiment, pipe identifiers may be used to refer topipes. A pipe identifier may canonically, uniquely and unambiguouslyrefer to a pipe. In one embodiment, support for pipe identifiers may beoptional. In one embodiment, if a peer-to-peer platform bindingrecognizes the pipe identifier format, it should be able to extract apeer group identifier from a given pipe identifier. This peer groupidentifier identifies the peer group to which the pipe belongs.

[0114] In one embodiment, a module class identifier may identify aparticular local behavior; for example, a specific API for eachexecution environment for which an implementation of the module exists.A module class identifier may canonically, uniquely and unambiguouslyrefer to a module class as defined by an advertisement. If apeer-to-peer platform binding recognizes the module class identifiertype, it should be able to extract a base class identifier from a moduleclass identifier. The base class identifier allows applications todetermine if two module class identifiers differ only in the “role” theyperform. In one embodiment, a module specification identifier's “roles”may allow the same module to be reused within a group and to haveinstances distinguished. This may be necessary when, for example, acommon database service is used, with each role accessing a differentdata set.

[0115] In one embodiment, a module specification identifier may uniquelyidentify a particular network behavior (e.g. wire protocol andchoreography) that may be embodied by a software module. In oneembodiment, there may be any number of implementations of a given modulespecification identifier. A module specification identifier may uniquelyidentify an abstract module for which there may be multipleplatform-specific implementations. A module specification identifier maybe used to locate a compatible implementation so that it can beinstantiated. In one embodiment, all such implementations are assumed tobe network compatible. A module specification identifier maycanonically, uniquely and unambiguously refer to a module specification.If a peer-to-peer platform binding recognizes this identifier type, itshould be able to extract a Module class identifier from a Modulespecification identifier. In one embodiment, each peer-to-peer platformidentifier types may have a specific definition for how its fields arerepresented within its structure.

[0116] In one embodiment, for peer-to-peer platform module classidentifiers, each module may be assigned a module service identifierthat may enable canonical references to be made to the service in thecontext of a specific peer group, and optionally within the context of aspecific peer. In one embodiment, for peer-to-peer platform modulespecification identifiers, each service may be assigned a unique serviceidentifier that may enable canonical references to be made to theservice in the context of a specific peer group, and optionally withinthe context of a specific peer.

[0117] One embodiment of the peer-to-peer platform may define anidentifier format that may be used for encoding peer-to-peer platformidentifiers. Peer-to-peer platform binding implementations preferablysupport this identifier format. In one embodiment, there may be one ormore reserved peer-to-peer platform identifiers, including, but notlimited to, the null identifier, the world peer group identifier, andthe net peer group identifier.

[0118] UUIDs

[0119] A peer group may theoretically be as large as the entireconnected universe. Naming anything uniquely is a challenge in such alarge namespace. In one embodiment, the peer-to-peer platform maysupport and/or provide sophisticated naming and binding services. In oneembodiment, the peer-to-peer platform may use a universal uniqueidentifier (UUID), for example, a 64- or 128-bit datum, to refer to anentity or resource (e.g. a peer, peer group, service, application, pipe,advertisement, endpoint, content, etc.). For example, UUIDs may beembedded in advertisements for internal use.

[0120] UUIDs provide unique identifiers for resources in thepeer-to-peer environment, and, in one embodiment, may identify theresource independently of the resource's location on the network. A UUIDmay be bound to other information, such as a network address of thecorresponding resource and/or a resource name of the resource. Thus,UUIDs help to provide peers, services and other peer-to-peer environmententities with access to resources in the peer-to-peer environmentindependent of the resources' locations.

[0121] In one embodiment, UUIDs may be used to guarantee that eachresource or entity has a unique UUID within a local runtime environmentand serves as a canonical way of referring to an entity, but because aglobal state is not assumed, it may not be possible to provide aguarantee of uniqueness across an entire community that may consist ofmillions of peers. This may not be a problem because a UUID may be usedwithin the peer-to-peer platform as an internal identifier. This maybecome significant only after the UUID is securely bound to otherinformation such as a name and a network address.

[0122] The UUID is an abstract data structure, and thus virtually anycanonical method may be used for representing UUIDs for use inpeer-to-peer environments. In one embodiment, different peer groups mayimplement different canonical representations of UUIDs in the samepeer-to-peer environment. In one embodiment, Uniform Resource Name (URN)format may be used for the representation of UUIDs. In one embodiment,Uniform Resource Identifier (URI) format may be used. In one embodiment,Uniform Resource Locator (URL) format may be used. In one embodiment,custom and/or proprietary methods of representing UUIDs may be used. Forexample, one peer group may use URN format for UUIDs, and another peergroup may use a proprietary alphanumeric naming scheme.

[0123] In one embodiment, the UUIDs may be used in providing flexibleconfiguration and seamless relocation of peer nodes on a peer-to-peernetwork, and may assist in locating and accessing content includingservices nearest to a peer node when the peer node is moved. Forexample, a businessperson based in New York may participate in apeer-to-peer network based on the peer-to-peer protocols using anotebook computer or other portable computing device connected to a LANas a peer node. The businessperson may access an instance of an emailand/or other services locally hosted by other peer nodes in a peer groupon the LAN. If the businessperson travels to Paris, for example, andtakes the notebook computer, the notebook computer may be connected to adifferent LAN at the Paris location and participate in the peer-to-peernetwork. Because the peer node has a unique identifier in thepeer-to-peer network (e.g. a UUID) rather than just a static networkaddress (the unique identifier may be bound to the static networkaddress), the peer node may seamlessly access instances of an emailservice and other services locally hosted on the LAN, or alternativelyhosted on a peer node at the peer node's original location or elsewhere,using the UUID to establish its identity. The peer node may rejoin thepeer group in New York to access one or more instances of services andother content hosted on the peer group, and may also join a peer groupat the Paris location to access one or more other instances of servicesand content.

[0124] Thus, the peer-to-peer protocols and UUIDs may provide theability for peer nodes to move to different peer groups and/or peerregions and access services and other content independent of networkaddresses and without requiring reconfiguration of the peer node. Forexample, when the exemplary peer node moves to Paris, connects to thenetwork (at a different network address) and accesses an instance of anemail service (either locally or remotely hosted, for example in the NewYork peer group), the email service may identify the peer node by itsunique identifier and route the peer's email to the peer node at the newnetwork address without requiring reconfiguration of the peer node.Thus, peer nodes may be relocated and access services and other contentthat are locally hosted or services and other content hosted in theiroriginal peer group if the services and other content are not requiredto be locally hosted.

[0125] Peers

[0126] Network nodes (peers) of various kinds may join the peer-to-peernetworking platform by implementing one or more of the platform'sprotocols. A peer may be any networked device (e.g. sensor, phone, PDA,PC, server, supercomputer, etc.) that implements one or more of the corepeer-to-peer platform protocols. Each peer operates independently andasynchronously of any other peer, providing a degree of reliability andscalability not typically found in current distributed systems. Somepeers may have more dependencies with other peers due to specialrelationships (e.g. gateways or routers). In one embodiment, a peer doesnot need to understand all of the protocols of the peer-to-peerplatform. The peer can still perform at a reduced level if it does notsupport one or more of the protocols.

[0127] Peers may publish and provide network resources (e.g. CPU,storage and routing resources) that may be used by other peers. Peersmay provide network services that may be used by other peers. Peerstypically interact with a small number of other peers (network neighborsor buddy peers). Peers that provide the same set of services tend to beinter-changeable. Thus, it may not matter which peers a peer interactswith. Generally, assumptions should not be made about peer reliabilityor connectivity, as a peer may appear or leave the network at any time.Peers may have persistent storage. A peer may optionally cacheinformation.

[0128] Peers may have multiple network interfaces. In one embodiment, apeer may not need to publish all of its interfaces for use with thepeer-to-peer protocols. Each published interface may be advertised as apeer endpoint. In one embodiment, a peer endpoint is an identifier (e.g.a URN or URI) that uniquely identifies a peer network interface. Peerendpoints may be used by peers to establish direct point-to-pointconnections between peers. Peers may not have direct point-to-pointnetwork connection between themselves, either due to lack of physicalnetwork connections, or network configuration (NATs, firewalls, proxies,etc.), and thus a peer may have to use one or more intermediary peers toroute a message from an endpoint to another peer endpoint.

[0129] The term rendezvous peer may be used to designate a peer that isdesignated to be a rendezvous point for discovering information aboutother peers, peer groups, services and pipes. In one embodiment,rendezvous peers may cache information that may be useful to peersincluding new peers. Rendezvous peers may provide an efficient mechanismfor peers that are far away to find (e.g. discover) each other.Rendezvous peers may make peer discovery more practical and efficient.In one embodiment, a peer group is not required to have a rendezvouspeer. In one embodiment, any or even all members of a peer group maybecome rendezvous peers in a peer group. In one embodiment, each peergroup may have different policies to authorize a peer to become arendezvous peer.

[0130] The term router peer may be used to describe a peer that crossesone or more regions and is designated to be a router between theregions. Router peers may be used to route messages between differentnetwork protocols (e.g. TCP/IP, IrDA) or to peers that are behindfirewalls. In one embodiment, any or all peer members may becomerouters. In one embodiment, peer groups may have different policies toauthorize a peer to become a router peer for other peers.

[0131] In one embodiment, every peer in the peer-to-peer network mayhave a unique peer identifier (e.g. UUID). Other peer-to-peer networkresources may also have unique identifiers, including peer groups,services, applications, pipes, endpoints, content and resourceadvertisements. In one embodiment, the peer identifier may identify apeer group in which the peer is a member peer. In one embodiment, a peermay have a different peer identifier for each group in which it is amember peer. A peer identifier that also identifies a peer group inwhich the peer is a member peer may be used to differentiate peers thatseek access to a service or content on a peer within the peer group. Forexample, a peer may provide implementations of a service in two or moredifferent peer groups in which it is a member peer. The peer mayadvertise a different peer identifier within each peer group, and maydifferentiate between messages received from peers in the different peergroups by examining their respective peer identifiers to identify theparticular peer group in which the peers that sent the messages aremember peers to determine which service implementation to provide to therequesting peers.

[0132] Peers may be identified by their unique identifier (UUID) ratherthan by a fixed address. When a peer boots, it attempts to contact otherpeers. In one embodiment, contacted peers may include variable-sizedcaches that map nearby peers' UUID to their current addresses. Thisallows embodiments of the peer-to-peer platform to be run over a dialupconnection, for example.

[0133] The peer identifiers may be included in resource advertisementsof resources associated with the peers. For example, the peeridentifiers may be included in peer advertisements, peer groupadvertisements, service advertisements, pipe advertisements and endpointadvertisements, among others. In one embodiment, a peer identifier maybe bound to a network address (e.g. IP address, URI, URN or URL) of thepeer. If the peer changes network addresses (e.g. is moved to a newnetwork location), the peer identifier may be unbound from the networkaddress and bound to the new network address. Thus, the peer identifierprovides a dynamic identification and addressing mechanism for peers inthe peer-to-peer network, rather than a static mechanism, allowing peersto change network locations and still be identifiable (e.g. in peergroups the peer is a member peer of) using the same peer identifier.

[0134] In one embodiment, the peer identifier may include informationidentifying a particular peer group the peer is a member peer of. In oneembodiment, a peer may be assigned a different, unique peer identifierfor each peer group the peer is a member peer of. In one embodiment,peer identifiers may be included in messages received from other peers.If the receiving peer is a member in more than one peer group, thereceiving peer may use the peer identifiers received in the messages toidentify particular implementations of resources (e.g. services, pipes,endpoints and content) that are available for access by the sendingpeers.

[0135] The resource identifiers may be included in resourceadvertisements for the resources. At least a portion of the resourceidentifiers may be bound to a network address (e.g. IP address, URI, URNor URL) corresponding to the resource. At least a portion of theresource identifiers may also specify a particular peer and/or peergroup that hosts the resource. Resources may include, but are notlimited to, peers, peer groups, services, applications, advertisements,content, pipes and pipe endpoints.

[0136] In one embodiment, a peer may be assigned a unique string as aname. Any naming scheme may be used. In one embodiment, names are notunique unless a coordinated naming service is used to guarantee nameuniqueness. A naming service is typically a centralized service thatguarantees the uniqueness of name and can be used to register namemapping. Examples of naming services are DNS and LDAP. In oneembodiment, the use of a naming service may be optional.

[0137] Peer Groups

[0138] Peers may spontaneously discover each other on the network toform transient or persistent relationships called peer groups. Peergroups are collections of peers that may share some common interest orinterests. Peer groups may also be statically predefined. In oneembodiment, a peer group may provide one or more peer group services. Inone embodiment the peer-to-peer platform may defines a core set of peergroup services. The peer-to-peer platform protocols may specify the wireformat for these core peer group services. Additional peer groupservices may be developed for delivering specific services. For example,a lookup service could be implemented to find active (running on somepeer) and inactive (not yet running) service instances

[0139] Some embodiments of the peer-to-peer platform may describe how tocreate and discover peer groups, but may not dictate when, where, or whyto create a peer group, the type of the group, or the membership of thegroup. A peer group may provide a common membership definition. Eachpeer group may establish its own membership policy in a range from open(any peer can join) up to highly secure and protected (a peer may joinonly if it possesses sufficient credentials).

[0140] In one embodiment, peers wishing to join a peer group may firstlocate a current member, and then request to join the peer group. Thepeer-to-peer platform may define how to discover peer groups, e.g. usinga peer discovery protocol. The application to join may be rejected oraccepted by the collective set of current members in accordance with thepeer group's membership policy. In one embodiment, a peer group coremembership service may be used to enforce a vote among one or more groupmembers. Alternatively, one or more group representative member peersmay be elected or appointed to accept or reject new membershipapplications.

[0141] In one embodiment, the peer-to-peer platform is not concernedwith what sequence of events a peer or a peer group comes intoexistence. Moreover, in one embodiment, the peer-to-peer platform doesnot limit how many groups a peer can belong to. In one embodiment,nested and/or overlapping peer groups may be formed. In one embodiment,there may be a special group, called the World Peer Group, which mayinclude all peer-to-peer platform peers. In one embodiment, the worldpeer group may provide the minimum seed for every peer to potentiallyfind each other and form new groups. In one embodiment, the world peergroup has an open membership policy (e.g. has a null membershipauthenticator service). Some peers inside the world peer group may notbe able to discover or communicate with each other—e.g., they may beseparated by a network partition. In one embodiment, participation inthe World Peer Group is by default.

[0142] The peer-to-peer platform may use the concept of a peer group asan implicit scope of all messages originated from within the group. Peergroups may serve to subdivide the network into abstract regionsproviding an implicit scoping mechanism. Peer groups may provide alimited scoping environment to ensure scalability. Peer groups may beformed and self organized based upon the mutual interest of peers. Inone embodiment, no particular rules are imposed on the way peer groupsare formed, but peers with the same interests may tend to join the samepeer groups.

[0143] In one embodiment, a scope may be realized with the formation ofa corresponding peer group. Peer group boundaries may define the searchscope when searching for a group's content. For example, a peer in SanFrancisco looking to buy a used car is normally not interested in carsavailable outside of the Bay Area. In this case, the peer may want tomulticast a message to a subset of the current worldwide peer group, anda subgroup may be formed especially for this purpose. In one embodiment,the multicast may be done without the formation of a new peer group. Inone embodiment, all messages may carry a special scope field, which mayindicate the scope for which the message is intended. Any peer whoreceives this message may propagate the message based on the scopeindicator. In one embodiment, using this approach, a sending peer may bebootstrapped with some well-defined scopes, and may have the ability todiscover additional scopes.

[0144] Peer groups may also be formed based upon the proximity of themember peers. Proximity-based peer groups may serve to subdivide thenetwork into abstract regions. Regions may serve as a placeholder forgeneral communication and security configurations that deal withexisting networking infrastructure, communication scopes and securityrequirements. Peer groups may provide a scoping mechanism to reducetraffic overload.

[0145] Peer groups may provide a secure cooperative environment. Peergroup boundaries permit member peers to access and publish protectedcontents. Peer groups form virtual secure regions which boundaries limitaccess to the peer group resources. Secure services may be provided topeers within a secured peer group. Their boundaries may or may notreflect any underlying physical network boundaries such as those imposedby routers and firewalls. The concept of a region may virtualize thenotion of routers and firewalls, subdividing the network into secureregions in a self-organizing fashion without respect to actual physicalnetwork boundaries.

[0146] Peer groups may also create a monitoring environment. Peer groupsmay permit peers to monitor a set of peers for any special purpose(heartbeat, traffic introspection, accountability, etc.). Peer groupsmay also provide a controlled and self-administered environment. Peergroups may provide a self-organized structure that is self-managed andthat may be locally managed.

[0147] In one embodiment, peer groups using the peer-to-peer platformmay provide capabilities to peers including one or more of, but notlimited to, finding nearby peers, finding named peers anywhere on thenetwork, finding named peer groups anywhere on the network, joining andresigning from a peer group, establishing pipes between peer groupmembers, and finding and exchanging shared content.

[0148] Content

[0149] Peers may be grouped into peer groups to share content. A contentis published and shared among the peer members of a peer group. In oneembodiment, content may be shared among group members, but not betweengroups. In this embodiment, no single item of content may belong to morethan one group. If the same content is published in two different peergroups, two different contents may be created. In one embodiment, acontent item may be published to make the item's existence known andavailable to group members using advertisements.

[0150] An instance of content is a copy of a content. Each content copymay be replicated on different peers in the peer group. In oneembodiment, each copy may have the same content identifier as well as asimilar value. Replicating contents within a peer group may help anysingle item of content be more available. For example, if an item hastwo instances residing on two different peers, only one of the peersneeds to be alive and respond to the content request. In one embodiment,the peer-to-peer platform protocols do not specify how or when contentsare replicated. In one embodiment, whether and how to copy an item ofcontent may be a policy decision that may be encapsulated inhigher-level applications and services, for example a content managementservice.

[0151] A content may be any computer content (e.g. code, data,applications, active content such as services, or other collection ofcomputer-representable resources). Examples of content include, but arenot limited to, a text file, a structured document (e.g. a PDF or a XMLfile), a Java “jar” or loadable library, code or even an executableprocess (checkpointed state). No size limitation is assumed. Eachcontent instance may reside on a different peer in the peer group. Theinstances may differ in their encoding type. HTML, XML and WML areexamples of encoding types. Each instance may have the same contentidentifier as well as a similar set of elements and attributes, and mayeven exist on the same peer. An encoding metadata element may be used todifferentiate instances of content. Making new instances of content ondifferent peers may help any single item of content be more available.For example, if an item has two instances residing on two differentpeers, only one of the peers needs to be alive and respond to thecontent request.

[0152] Items of content that represent a network service may be referredto as active content. These items may have additional core elementsbeyond the basic elements used for identification and advertisement. Inone embodiment, active content items may be recognized by Multi-PurposeInternet Mail Extensions (MIME) content type and subtype. In oneembodiment, all peer-to-peer platform active contents may have the sametype. In one embodiment, the subtype of an active content may be definedby network service providers and may be used to imply the additionalcore elements belonging to active content documents. In one embodiment,the peer-to-peer platform may give latitude to service providers in thisregard, yielding many service implementation possibilities.

[0153] In one embodiment, each item of content may have a uniquecanonical name. FIG. 3 illustrates an exemplary canonical content name(which may be referred to as a content identifier or content identifier)according to one embodiment. The unique identifier may include a peergroup universal unique identifier (UUID) 170, and may include anothername 174 that may be computed, parsed, and maintained by peer groupmembers. In one embodiment, the UUID may be a 128-bit field. In oneembodiment, the name may be a byte array. In one embodiment, theparticular name implementation within a peer group is not mandated bythe peer-to-peer platform. The name may be, for example, a hash code, aURI, a URN, or a name generated by any suitable means of uniquelyidentifying content within a peer group. In one embodiment, a length ofremainder field 172 may specify the length of the name field 174 forthis content in this particular implementation.

[0154] In one embodiment, once a content item has been published to thepeer-to-peer network, it may not be assumed that that the content can belater retrieved from the network. The content may be only available frompeers that are not currently reachable or not currently part of thenetwork. In one embodiment, once a content item has been published tothe peer-to-peer network, it may not be assumed that the content can bedeleted. Replication/republication of content by peers on the networkmay be unrestricted and the content may propagate to peers that are notreachable from the publishing peer.

[0155] Pipes

[0156] Pipes may provide the primary channels for communication amongpeers and are a mechanism for establishing communication between peers.Pipes may be used as communication channels for sending and receivingmessages between services or applications over peer endpoints. Peerendpoints correspond to the available peer network interfaces that canbe used to send and receive data from another peer. Pipes may connectpeers that have a direct physical link and peers that do not have adirect physical link. In the latter case, one or more intermediary peerendpoints may be used to route messages between the two pipe endpoints.A pipe instance is, logically speaking, a resource within a peer group.The actual implementation of a pipe instance is typically through a pipeservice. In one embodiment, at each endpoint, software to send, orreceive, as well as to manage optional associated pipe message queues isassumed, but not mandated.

[0157] In one embodiment, pipes are a mechanism for interacting withservices on the peer-to-peer network. Rather than assuming a specificnaming system such as DNS or a specific network addressing system suchas IP, the peer-to-peer platform may abstract these concepts via severalmechanisms. Pipes provide a virtual abstraction of the network serviceusing a pipe identifier that is bound to a peer identifier via a pipeadvertisement, which in turn is bound to an endpoint address via a peeradvertisement and an endpoint advertisement. Pipes can thus be movedfrom one peer to another providing flexibility in the way a service isdeployed and consumed. The location of a machine (node) on the networkis abstracted via the concept of the peer that binds to an endpoint.This provides support for dynamic movement of endpoint addresses for aspecific peer.

[0158] In one embodiment, pipes are implemented as a service on a peer.In one embodiment, in order for a peer to send a message to anotherpeer's pipe, both peers must be part of the same peer group. This allowsgroups of peers to potentially implement different kinds of pipes,allowing for a flexible approach to communication.

[0159] In one embodiment, to connect to a pipe, a peer may send adiscovery request for a pipe advertisement containing specific keywords.The peer may then receive the requested pipe advertisement. The peer maythen send a pipe resolver request for a peer matching the pipeidentifier and may then receive the peer advertisement, for example froma pipe service that handles the request. The peer may then send datadown the pipe, for example using a URL addressing scheme.

[0160] In one embodiment, pipes in the peer-to-peer platform may beasynchronous, unidirectional, stateless and unreliable to provide thelowest overhead. In one embodiment, pipes may be unidirectional, andthus there may be input pipes and output pipes. Asynchronous pipes mayenable developers to build large-scale interconnected distributedservices and applications. In one embodiment, pipes may beindiscriminate, and may thus support binary code, data strings, Javatechnology-based objects, and/or applets, among others. In oneembodiment, the peer-to-peer platform may not define how the internalsof a pipe work. Any number of unicast and multicast protocols andalgorithms, and combinations thereof, may be used. In one embodiment,one pipe may be chained together with each section of the chain using adifferent transport protocol.

[0161] The pipe endpoints may be referred to as input pipes (receivingend) and output pipes (sending end). Pipes may provide the illusion of a“virtual” in and out mailbox that is independent of any single peerlocation and network topology (e.g. multi-hops route). Services andapplications may communicate through pipes without knowing on whichphysical peer a pipe endpoint is bound. When a message is sent into apipe, the message is sent to all peer endpoints currently connected(listening) to the pipe. The set of currently connected pipe endpoints(input pipes) may be obtained using the pipe binding protocol.

[0162] Unlike conventional mechanisms, peer-to-peer platform pipes mayhave ends that may be moved around and bound to different peers atdifferent times, or not connected at all. In one embodiment, pipes maybe virtual, in that a pipe's endpoint may be bound to one or more peerendpoints. In one embodiment, pipe endpoints may be non-localized to aphysical peer, and may be dynamically bound at creation time or runtimevia the pipe binding protocol. The pipe binding process may includediscovering and connecting the two or more endpoints of a pipe.

[0163] Using pipes, developers may build highly available services wherepipe connections may be established independently of a peer location.This dynamic binding of pipes helps to provide redundant implementationof services over a P2P network. A peer may logically “pick up” a pipe atany point in time. For example, a peer that wants to use a spell checkerservice man connect to a peer group's spell checker pipe that isimplemented as a redundant peer group service. The peer may be servicedas long as there is at least one single instance of a spell checkerservice still running somewhere within the peer group. Thus, using pipesas described herein, a collection of peers together may provide a highlevel of fault tolerance, where a new peer at a different location mayreplace a crashed peer, with the new peer taking over the existing pipeto keep the communication going.

[0164] In one embodiment, enhanced pipes with additional properties suchas reliability, security, and quality of service may be supported. Inembodiments where the peer-to-peer platform runs on top of transportsthat have such properties, an implementation may optimize and utilizethe transports. For example, when two peers communicate with each otherand both have TCP/IP support, then an implementation may use thebidirectional capabilities of TCP/IP to create bidirectional pipes.Other data transfer methods that may be implemented by pipes as providedat the service layer to provide different quality of service include,but are not limited to: synchronous request-response (the endpoint sendsa message, and receives a correlated answer), streaming (efficientcontrol-flow data transfer), bulk transfer (bulk reliable data transferof binary data), and secure (secure reliable data streams).

[0165] Pipes may offer several modes of communication. FIG. 4illustrates a point-to-point pipe connection between peers 200C and 200Daccording to one embodiment. In one embodiment, a point-to-point pipeconnects exactly two peer endpoints together, an input pipe 202A thatreceives messages sent from an output pipe 204A. The pipe appears as anoutput pipe to the sender and as an input pipe to the receiver, withtraffic going in one direction only—from the sender to the receiver. Inone embodiment, no reply or acknowledgement operation is supported. Inone embodiment, additional information in the message payload (forexample, a unique identifier) may be required to thread messagesequences. The message payload may also contain a pipe advertisementthat can be used to open a pipe to reply to the sender (send/response).

[0166]FIG. 4 also illustrates a propagate pipe with peer 200A as apropagation source and peers 200B and 200C with listening input pipesaccording to one embodiment. A propagate pipe may connect two or morepeer endpoints together, from one output pipe 204B to one or more inputpipes (e.g. 202B and 202C). The result is that any message sent into theoutput pipe is sent to all input pipes. Messages flow into the inputpipes from the output pipe (propagation source). A propagate message maybe sent to all listening input pipes. This process may create multiplecopies of the message to be sent. On transports that provide multicast(e.g. TCP/IP), when the propagate scope maps to underlying physicalsubnets in a one-to-one fashion, transport multicast be may used as animplementation for propagate. Propagate may be implemented usingpoint-to-point communication on transports that do not provide multicastsuch as HTTP.

[0167] Messages

[0168] In one embodiment, the peer-to-peer platform may use asynchronousmessages as a basis for providing Internet-scalable peer-to-peercommunication. The information transmitted using pipes may be packagedas messages. Messages define an envelope to transfer any kinds of data.A message may contain an arbitrary number of named subsections that mayhold any form of data. In one embodiment, the messages may be in amarkup language. In one embodiment, the markup language is XML. Eachpeer's messaging layer may deliver an ordered sequence of bytes from thepeer to another peer. The messaging layer may send information as asequence of bytes in one atomic message unit. In one embodiment,messages may be sent between peer endpoints. In one embodiment, anendpoint may be defined as a logical destination (e.g. embodied as aURN) on any networking transport capable of sending and receivingDatagram-style messages. Endpoints are typically mapped into physicaladdresses by the messaging layer at runtime.

[0169] In one embodiment, a message is a set of named and typed contentscalled elements. Thus, a message may be a set of name/value pairs. Thecontent may be of arbitrary types. Core services may send advertisementsas message element content.

[0170] As a message passes down a protocol stack (applications,services, endpoint and transports), each level may add one or more namedelements to the message. As a message is passed back up the stack on thereceiving peer, the protocol handlers may remove those elements. In oneembodiment, a message is an ordered sequence of message elements. In oneembodiment, the most recently added element appears at the end of themessage.

[0171] In one embodiment, a message element may include one or more of,but is not limited to, a namespace, a name (which may be optional), atype (which may be optional), a signature or digest (which may beoptional), and content. In one embodiment, every message element may beassigned to a namespace. Namespaces may be used to organize elementsused by different message users and transports within the same message.In one embodiment, two namespaces names are considered equivalent iftheir representation is byte-for-byte identical.

[0172] In one embodiment, one or more message element namespaces may bepre-defined and reserved for user applications and services;peer-to-peer platform protocols and/or services may not use or modifyelements in these reserved namespace. In one embodiment, one or morenamespaces may be reserved for internal use by the peer-to-peer platformprotocols and services. In this embodiment, applications preferably donot create, manipulate or assume the interpretation of any of thecontent of elements in these namespaces. In some bindings, applicationsmay be forbidden from accessing or creating elements in thesenamespaces. In one embodiment, use of namespaces by services andapplications may be optional. In one embodiment, namespaces may notrequire formal registration as the protocols used need only be agreedupon by the participants.

[0173] In one embodiment, message elements may have an optional name.Elements in the same message may have the same name.

[0174] In one embodiment, a type may be specified as a MIME type. Thetype may be used by the applications and services that process theelement. In one embodiment, there may be no restriction on the set ofMIME types that can be used by applications and services. In oneembodiment, the type of the element may be examined by a peer-to-peerplatform transport to determine how to format the message element toensure the most efficient transfer. In one embodiment, if a type is notspecified for an element, an application stream may be assumed.

[0175] In one embodiment, the contents of the element data may be opaqueto except to the applications and services which use these elements.

[0176] In one embodiment, a message may be a Datagram that may includean envelope and a stack of protocol headers with bodies and an optionaltrailer. The envelope may include, but is not limited to, a header, amessage digest, (optionally) the source endpoint, and the destinationendpoint. In one embodiment, each protocol header may include, but isnot limited to, a tag naming the protocol in use and a body length. Eachprotocol body may be a variable length amount of bytes that is protocoltag dependent. Each protocol body may include, but is not limited to,one or more credentials used to identify the sender to the receiver. Inone embodiment, such a message format may support multiple transportstandards. In one embodiment, an optional trailer may include traces andaccounting information.

[0177] The messaging layer may use the transport specified by the URN tosend and receive messages. In one embodiment, both reliableconnection-based transports such as TCP/IP and unreliable connectionlesstransports like UDP/IP may be supported. Other existing messagetransports such as IrDA, and emerging transports like Bluetooth may besupported using the peer endpoint addressing scheme. In one embodiment,peer-to-peer platform messages may be useable on top of asynchronous,unreliable, and unidirectional transport. In one embodiment, thepeer-to-peer platform protocols may use a low-level message transportlayer (e.g. XML) as a basis for providing Internet-scalable peer-to-peercommunication. In one embodiment, the peer-to-peer platform may notassume that the networking transport is IP-based.

[0178] The message digest in the envelope may be used to guarantee thedata integrity of messages. Messages may also be encrypted and signedfor confidentiality and refutability. In one embodiment, each protocolbody may include one or more credentials used to identify the sender tothe receiver. A credential is a key that, when presented in a messagebody, may be used to identify a sender and to verify that sender's rightto send the message to the specified endpoint. In one embodiment, thecredential may be an opaque token that may be presented each time amessage is sent. In one embodiment, the sending address placed in themessage envelope may be crosschecked with the sender's identity in thecredential. Credentials may be stored in the message body on aper-protocol <tag> basis. In one embodiment, the exact format andcontent of the credentials are not specified by the peer-to-peerplatform. For example, a credential may be a signature that providesproof of message integrity and/or origin. As another example, a messagebody may be encrypted, with the credential providing further informationon how to decrypt the content. In one embodiment, each credential'simplementation may be specified as a plug-in configuration, which mayallow multiple authentication configurations to coexist on the samenetwork.

[0179] When an unreliable networking transport is used, each message maybe delivered more than once to the same destination or may not arrive atthe destination. Two or more messages may arrive in a different orderthan sent. In one embodiment, high-level communication services layeredupon the core protocols may perform message re-ordering, duplicatemessage removal, and processing acknowledgement messages that indicatesome previously sent message actually arrived at a peer. Regardless oftransport, messages may be unicast (point to point) between two peers ormay be propagated (like a multicast) to a peer group. In one embodiment,no multicast support in the underlying transport is required. In oneembodiment, peers receiving a corrupted or compromised message maydiscard the message. Messages may be corrupted or intentionally alteredin transmission on the network.

[0180] In one embodiment, the peer-to-peer platform may not mandate howmessages are propagated. For example, when a peer sends out a peerdiscovery message, the peer discovery protocol may not dictate if themessage should be confined to the local area network only, or if it mustbe propagated to every corner of the world.

[0181] In one embodiment, the peer-to-peer platform messages 252 may bedefined with the envelope 250 as illustrated in FIG. 5. In oneembodiment, the messages are defined in a markup language. In oneembodiment, the markup language is XML. The following is an exemplarymessage in XML: <SampleMessage> <SampleMessageVersion >version number“1.0”</ SampleMessageVersion> <SampleMessageDest> destination peeridentifier </ SampleMessageDest> <SampleMessageSrc> source peeridentifier </SampleMessageSrc> <SampleMessageDigest> digest</SampleMessageDigest> <SampleMessageTagName> tag</SampleMessageTagName> <SampleMessageTagData> body</SampleMessageTagData> . . . <SampleMessageTagName> tag</SampleMessageTagName> <SampleMessageTagData> body</SampleMessageTagData> <SampleMessageTrailer>String</SampleMessageTrailer> </Sample Message>

[0182] The version number may be a string. The destination and sourcepeer identifier may be represented as peer-to-peer platform identifiers(UUIDs). In one embodiment, the digest is either an MD5 or SHA1 hash ora digital signature. The digest may serve as a placeholder for either. Amessage may have as many tag parts as needed. In one embodiment, the tagname may be a string and the body may be a byte array containing astring without XML escape characters (“<”, “>”) or a base64 encodedstring.

[0183] In one embodiment, the message format may support binary dataand/or multi-part messages with MIME-types. The message format may allowfor arbitrary message header fields, including optional header fields.The message format may allow for data verification of message contentand the cryptographic signing of messages. The message format mayprovide an arbitrary number of named subsections that may contain anyform of data of any (reasonable) size. The message format may be“email-safe” such that its contents may be extracted reliably afterstandard textual transformations committed my E-mail client and serversoftware.

[0184] Software Modules

[0185] In a peer-to-peer network, one embodiment of a peer-to-peerplatform may use a mechanism for abstract identity and definition ofsoftware modules (e.g. services, applications, etc.) to provideinformation about the programming interface and functionality of thesoftware modules independently of protocols and behaviors that may beused to implement the software modules. Further, software modules in apeer-to-peer network may provide one or more implementations of a givenfunctionality, using various protocols and behaviors, while retaining acommon programming interface. The software modules may also provide oneor more different network-compatible implementations for differentexecution environments.

[0186] Embodiments may use identifiers (e.g., UUIDs) and advertisementsas described herein to describe and identify software modules, such asservices and applications, in a hierarchical manner. In one embodiment,a software module may be described in a module class advertisement andgiven a module class identifier. If that software module is used fordifferent purposes in the same context, the software module may befurther identified by an extension to its module class identifierreferred to as a role identifier. Each independent embodiment of thesoftware module that provides an independent set of network protocolsand behaviors may be assigned a module specification identifier.

[0187] In one embodiment, all implementations of all embodiments of agiven module class for a given execution environment may have the sameprogramming interface. Therefore, software modules interacting locallymay express their dependencies via their respective class identifiers(including the role extension), regardless of the particular executionenvironment and embodiment that was selected when configuring thatenvironment.

[0188] In one embodiment, a software module may be assigned a moduleclass identifier. Each independent embodiment of the software modulethat provides an independent set of network protocols and behaviors maybe described by a module specification advertisement and assigned amodule specification identifier. In one embodiment, a modulespecification identifier may be an extension of the identifier of themodule class of which the module specification is an embodiment. In oneembodiment, each implementation of each module specification may bedescribed by a module implementation advertisement that may include oneor more of, but is not limited to, the following information: a modulespecification identifier, an execution environment description, and areference to a software environment (e.g. a software package whichimplements the module specification for the execution environment).

[0189] To abstract software modules in peer-to-peer networkingenvironments, embodiments may use a tiered architecture to definemodules (e.g. services, advertisements, etc.) in a peer-to-peerenvironment. FIG. 31 illustrates this tiered architecture according toone embodiment. A first level of the tier may include one or more moduleclasses 1000. In one embodiment as illustrated in FIG. 31, each moduleclass 1000 may have one module specification 1002. A modulespecification 1002 may have one or more module implementations 1004.FIG. 32 illustrates the tiered architecture according to anotherembodiment. In this embodiment, each module class 1000 may have one ormore module specifications 1002. Each module specification 1002 may haveone or more module implementations 1004.

[0190] In one embodiment, the module class 1000 may include and/ordefine one or more of, but is not limited to, the “role” a module plays(e.g., in a peer group), how the module appears to other modules (e.g.,services and applications), plus the module's API in each supportedbinding. In one embodiment, the module specification 1002 may includeand/or define one or more of, but is not limited to, the module'sbehavior as it appears from the outside (e.g. from other modules),including the module's wire protocol and the module's compatibility withother instances of the same module, for example on other peers. In oneembodiment, the module implementation(s) 1004 may include one or moreimplementations of each module specification 1002, with each moduleimplementation being specific for one or more of various executionenvironments, bindings and other constraints. Each of these aspects of amodule may be published separately in advertisements.

[0191] To access a software module, a peer (or other entity such asanother software module (e.g. service, application, etc.)) may use adiscovery process such as that described herein for the peer-to-peerplatform to discover a module implementation advertisement correspondingto the execution environment of the peer. In one embodiment, thediscovery process may search for and discover peer specificationadvertisements that meet the specification requirements of the peer, anduse the one or more discovered peer specification advertisements tolocate a particular peer implementation advertisement for a moduleimplementation suitable for use in the peer's execution environment.

[0192] The layers of advertisements (module class, module specification,and module implementation) may be used to abstract the software modules(e.g. services) and platforms, to locate specifications for desiredsoftware modules, to locate implementations of the software modules, andto load and run the software modules.

[0193] Embodiments may provide a mechanism to identify a particularsoftware module (e.g. a service) and its behavior. In one embodiment, asoftware module such as a service may be described with a modulespecification identifier. The module specification advertisementdescribes the software module, e.g. the behavior of the software module.In one embodiment, no matter what platform a user (or other entity suchas another software module) is on, the user or other entity may locate(e.g. by a discovery process) a particular implementation of thesoftware module for the particular platform and be able to use thesoftware module. The module implementation advertisements may describeimplementations of the software module (which may be identified by amodule specification identifier, included in the module implementationadvertisements and the module specification advertisement) for differentplatforms, e.g. Windows, Unix and Solaris platforms.

[0194] As an example, a user or other entity may be able to locate anduse a particular implementation of a printing service for use with theplatform the user or other entity is on. In one embodiment, the user orother entity may first search for and locate a specification for thesoftware module, and once that is located the user or other entity maylook for a particular implementation of the software module usable onthe user or other entity's platform, load the implementation of thesoftware module according to the advertisements for use on the platform,and run the software module.

[0195] The layers of advertisements may also serve to separate thespecification from the implementation. This may reduce the size of themodule implementation advertisements, as the advertisements do not needto include the full specification for the software module but insteadmay refer back to the specification advertisement via the modulespecification identifier. This may allow software modules to beinitially located by specification for a particular class offunctionality, rather than having to search through many implementationadvertisements of software modules to find a desired implementation of aspecification, preferably making the discovery process simpler.

[0196] In one embodiment, after locating a desired module implementationadvertisement, using a PURI (Package Uniform Resource Identifier,described below) of the module implementation advertisement, on a Javaplatform, a URI or URL to the actual code of the software module may bespecified. On other platforms such as Unix and Linux, a file locationmay be specified by URL, URI, or other mechanisms. The code may bedownloaded, referenced on disk, or referenced by the URI or othermechanism. The SURI (Specification URI, described below) of the modulespecification advertisement may function similarly to retrieve adocument containing the module specification

[0197] Services

[0198] Peers may cooperate and communicate to publish, discover andinvoke network services. A service denotes a set of functions that aprovider offers. In one embodiment, a peer-to-peer platform peer canoffer a service by itself or in cooperation with other peers. In oneembodiment, a peer may publicize a service by publishing a serviceadvertisement for the service. Other peers may then discover the serviceusing the peer discovery protocol (through the advertisement) and makeuse of it. A peer may publish as many services as it can provide.

[0199] In one embodiment, services may either be pre-installed into apeer or loaded from the network. The process of finding, downloading andinstalling a service from the network may include performing a search onthe network for the service, retrieving the service, and then installingthe service. Once a service is installed and activated, pipes may beused to communicate with the service. In one embodiment, peer-to-peerplatform-enabled services may publish pipe advertisements as their maininvocation mechanism. The service advertisement may specify one or morepipe advertisements that may be used by a peer to create output pipes toinvoke the service. The service advertisement may also include a list ofpredetermined messages that may be sent by a peer to interact with theservice. The service advertisement may describe all messages that aclient may send or receive.

[0200] Several methods may be provided by various embodiments to publisha service. Services may be published before creating a new peer group byadding the service advertisement to the peer group advertisement.Services may also be published by adding the services in a separate peerservice advertisement. The discovery service may also allow newadvertisements to be added at runtime. The new advertisement will belongto a predefined peer group. Other methods of publishing services may beprovided. Note that service advertisements may be placed in the peergroup advertisement of any group. Since all peers belong to the globalpeer group, a peer may publish the service in the global peer groupadvertisement to make it available to any peer.

[0201] In one embodiment, services advertised in a peer groupadvertisement may be instantiated for a peer when the peer joins thegroup. In one embodiment, all the services are instantiated. In anotherembodiment, none, one, or more of the advertised services may beinstantiated when the peer joins the peer group. Service advertisementsin the peer group advertisement may include resolver, discovery,membership, peer information and pipe service advertisements. In oneembodiment, services advertised in a peer group advertisement are loadedon the peer when the peer boots. In one embodiment, this automatedloading is not mandatory but is part of the Java Binding. One embodimentmay provide a mechanism to force a service in a peer group advertisementto be instantiated by a peer.

[0202] In one embodiment, when a peer boots, any services advertised inthe peer advertisement are loaded. The peer advertisement corresponds tothe platform advertisement. These services may include the minimal setof services to bootstrap the creation of new peers: discovery service,membership service, resolver service, peer information service and pipeservice.

[0203] In one embodiment, when a peer switches from one peer group toanother, the first group's services remain active. In one embodiment, apeer may call a stop method on the service application interface to stopan instance of a local service. A peer that is a member of one peergroup that refers to a service may join a second peer group that alsorefers to the service while still a member of the first. Whether theservice is instantiated once or twice may depend on the serviceimplementation. Some service implementations may use a staticinstantiation that is done once. In this case, all groups share the sameinstance. Other service implementations are local to a peer group andare not aware of the state of any other peer groups on the same node.

[0204] In one embodiment, services may use a “time to live” indicatorthat defines when the service was created, and may also define thelifetime of the service. After its lifetime has expired, the staleservice may be purged.

[0205] A service may be well-defined and widely available so that a peercan use it directly. Other services may require special code to accessthe service. For example, the way to interface with the service providermay be encoded in a piece of software. In this example, it may bedesirable for the peer to be able to locate an implementation that issuitable for the peer's specific runtime environment. In one embodiment,if multiple implementations of the same service are available, thenpeers hosted on Java runtimes can use Java programming languageimplementations while native peers to use native code implementations.In one embodiment, service implementations may be pre-installed into apeer node or loaded from the network. In one embodiment, once a serviceis installed and activated, pipes may be used to communicate with theservice.

[0206] In one embodiment, each service may have a unique identifier. Inone embodiment, a service may have a name that may include a canonicalname string that may indicate the type and/or purpose of the service. Aservice may also provide optional information (e.g. a set of descriptivekeywords) that further describes the service. The unique identifier,name and optional information may be stored within a serviceadvertisement. The advertisement may also include other informationneeded to configure and instantiate a service.

[0207] In one embodiment, the peer-to-peer platform may recognize twolevels of services, peer services and peer group services. A servicethat executes only on a single peer may be referred to as a peerservice. A peer service is accessible only on the peer that ispublishing the service. If that peer happens to fail, then service alsofails. This level of service reliability may be acceptable for anembedded device, for example, providing a calendar and email client to asingle user. Multiple instances of the service may be run on differentpeers, but each instance publishes its own advertisement. A service thatis composed of a collection of cooperating instances (potentiallycooperating with each other) of the service running on multiple peers ina peer group may be referred to as a peer group service. A peer groupservice may employ fault tolerance algorithms to provide the service ata higher level of availability than that a peer service can offer. Ifany one peer fails, the collective peer group service may not beaffected, because the service may still be available from at least oneother peer member. Peer group services may be published as part of thepeer group advertisement.

[0208] In one embodiment, the peer-to-peer platform may include a set ofdefault peer group services such as peer discovery, as well as a set ofconfigurable services such as routing. In one embodiment, a peer-to-peerplatform peer may not be required to have one or all of these services.For example, a cell phone peer may be pre-configured with enoughinformation to contact a fixed server provided by the telecom operator.This may be enough to bootstrap the cell phone peer without requiring itto independently carry with it additional services.

[0209] In one embodiment, although the concept of a service isorthogonal to that of a peer and a peer group, a peer group formed usingthe peer-to-peer platform may require a minimum set of services neededto support the operation of the group. Some services may be well knownand may be referred to as peer-to-peer platform core services.Embodiments of the peer-to-peer platform may define a set of core peergroup services that may be used to form and support peer groups. In oneembodiment, the core peer group services may provide the minimumservices required to form a peer group (e.g. membership and discoveryservices). In one embodiment, the peer-to-peer platform core servicesmay be 100% decentralized and thus may enable pure peer-to-peer networkcomputing. In one embodiment, it is not required that all core servicesbe implemented by every peer group.

[0210] In one embodiment, the peer-to-peer platform may define peergroup core services including, but not limited to, a discovery service,a membership service, an access service, a pipe service, a resolverservice and a monitoring service. A discovery service may be used tosearch for peer group resources such as peers, peer groups, and pipes.The search criteria may include a resource name. Discovery and discoveryservices are described more fully later in this document.

[0211] In one embodiment, most peer groups will have at least amembership service. Current peer group members may use the membershipservice during the login process to reject or accept a new peer groupmembership application. The membership service may be a “null”authenticator service that imposes no real membership policy. Peerswishing to join a peer group first locate a current member, and thenrequest to join. The application to join may be either rejected oraccepted by the collective set of current members. The membershipservice may enforce a vote of peers or alternatively elect a designatedgroup representative to accept or reject new membership applications.

[0212] An access service, may be used to validate, distribute, andauthenticate a group member's credentials. The access service may definethe type of credential used in the message-based protocols used withinthe peer group. The access service may be used to validate requests madeby one peer to another. The peer receiving the request provides therequesting peer's credentials and information about the request beingmade to the access service to determine if the access is permitted. Inone embodiment, not all actions within the peer group need to be checkedwith the access service, only those actions which only some peers arepermitted to use.

[0213] A pipe service may be used to establish and manage pipeconnections between the different peer group members. A resolver servicemay be used to send query string to peers to find information about apeer, a peer group, a service or a pipe. A monitoring service is used toallow one peer to monitor other members of the same peer group.

[0214] In on embodiment, not all the above services are required to beimplemented by a peer group. Each service may implement one or more ofthe peer-to-peer platform protocols. In one embodiment, a service mayimplement at least one protocol for simplicity and modularity reasons,but some services may not implement any protocols.

[0215] Other services may be user-defined and provide applicationdependent services such as content searching and indexing. Auser-defined service may provide additional APIs. User-defined servicesmay be implemented that may offer the ability to mix-in centralizationas a means of increasing performance. In one embodiment, thepeer-to-peer platform core services may provide a referenceimplementation for user-defined services. Examples of user definedservices may include, but are not limited to:

[0216] Efficient long-distance peer lookup and rendezvous using a peernaming and discovery service.

[0217] Simple, low-cost information search and indexing using a contentsharing service.

[0218] Interoperability with existing centralized networkinginfrastructure and security authorities in corporate, public, private,or university networks using administration services.

[0219] A resolver service may be implemented to find active (running onsome peer) and inactive (not yet running) service instances.

[0220] An FTP service that allows file transfers among peers over pipesusing FTP.

[0221] Network Services

[0222] Embodiments of the mechanism for abstract identity and definitionof software modules in peer-to-peer networking environments may be usedin implementing network services. A network service may be considered asone type of software module that may be abstracted using the mechanism.Software modules may also include applications, among other types.

[0223] In one embodiment, peers may cooperate and communicate topublish, discover and invoke network services. In one embodiment, peersmay discover network services via the peer discovery protocol of theexemplary peer-to-peer platform described herein. In one embodiment,network services may include peer services and peer group services. Apeer service may be accessible only on the peer that is publishing theservice. If that peer happens to fail, then the service also fails.Multiple instances of the service may be run on different peers, buteach instance publishes its own advertisement. A peer group service iscomposed of a collection of instances (potentially cooperating with eachother) of the service running on multiple members of the peer group. Ifany one peer fails, the collective peer group service may not beaffected, because the service may still be available from another peermember. Peer group services may be published as part of the peer groupadvertisement.

[0224] In one embodiment, services may be pre-installed into a peer orloaded from the network. The peer may follow a process of finding,downloading and installing a service from the network. To run a service,a peer may have to locate an implementation of the service (i.e. amodule implementation) suitable for the peer's runtime environment.Multiple implementations of the same service may allow, for example,Java peers to use Java code implementations, and native peers to usenative code implementations.

[0225] In one embodiment, the peer-to-peer platform may be designed tointeroperate and be compatible with various Web service standardsincluding one or more of, but not limited to, WSDL, uPnP, RMI, etc. Thepeer-to-peer platform protocols may define a generic framework topublish and discover advertisements that may describe services. In oneembodiment, peers may publish and discover advertisements via the peerdiscovery protocol. In one embodiment, an advertisement for a servicemay include necessary information to either invoke or instantiate theservice being described. In one embodiment, one or more peer-to-peerplatform protocols may define module advertisements to describeservices.

[0226] In one embodiment, peer-to-peer platform-enabled services areservices that are published using module specification advertisements.In one embodiment, a module specification advertisement may specify apipe advertisement that may be used by a peer to create output pipes toinvoke the service. In one embodiment, a module specificationadvertisement may include a list of pre-determined messages that may besent by a peer to interact with the service. In one embodiment, a modulespecification advertisement may include references to one or more otherservices that may be used as an authenticator for the service and/or asa local proxy for the service. In one embodiment, each service may beuniquely identified by its module specification identifier.

[0227] In one embodiment, a service may have several aspects including,but not limited to:

[0228] The “role” the service plays in the group; how the serviceappears to other services and applications, plus the service's API ineach supported binding. This may be referred to as the service class(i.e. the module class).

[0229] The service's apparent behavior from the outside, including, butnot limited to, wire protocol, and compatibility with the same serviceon other peers. In other words, a central definition of a service, orthe service's specification. This may be referred to as the servicespecification (i.e. the module specification).

[0230] One or more implementations of the specification for variousexecution environments, bindings and other constraints. These may bereferred to as the service implementations (i.e. moduleimplementations).

[0231] Each of these aspects of a service may be published separately,e.g. by the module advertisements described above. In one embodiment,there may be more specifications than classes and more implementationsthan specifications. In many cases, only the implementation is needed,for example, when instantiating a group that uses the service(s). Thelayered arrangement of class/specification(s)/implementation(s) may helpsave storage space by not requiring that information be duplicated inall implementation advertisements, and may help to prevent thedownloading of unneeded data. If this information was duplicated in allimplementation advertisements, not only would it occupy more storagespace than needed, but it also may cause the downloading of unneededdata.

[0232] Service specifications may be assigned a unique identifier at thetime the advertisement is published. Service implementations may usethis identifier to denote which service specification they implement.Service classes may be assigned a unique identifier when the class'sadvertisement is first published.

[0233] In one embodiment, service specifications may use identicalimplementations; therefore, service specification advertisements mayinclude a “free form” parameter section that includes one or moreparameters that may be used to control behavior. In one embodiment,service implementations may use identical code; therefore, serviceimplementation advertisements may include a “free form” parametersection that includes one or more implementation-dependent parameters.

[0234] In one embodiment, services may refer to each other (such as whenobtaining the interface of another service from the group) by theirclass identifier.

[0235] In one embodiment, the same service specification may be used toperform more than one role in a group. For example, consider twoinstances of the same data base service with two completely differentdata set and purposes. To support this, it service class identifiers maybe extended with a “role” suffix. In this embodiment, service classidentifiers without a role suffix may accept a null role suffix as avalid role suffix. Thus, service class identifiers may be “roled,” andif “roleing” is never needed, only a short service class identifier maybe needed.

[0236] In one embodiment, service specification identifiers may builtfrom the class identifier of the class that the service specificationimplements. In one embodiment, only the base class UUID may be includedso that service specification identifiers are unchanged by the additionof roles. This may be used, for example, to verify that a servicespecification does have the interface implied by the correspondingservice class, regardless of the role for which it is used.

[0237] In one embodiment, service implementation advertisements may listcompatibility requirements which may make them eligible to be loaded bya given group running in a given peer-to-peer platform implementation.

[0238] In one embodiment, groups, applications and endpoints may havesimilar constraints as services. For a group, the group specificationmay list the service specifications that this group supports. There maybe one or more implementations, depending on various executionconstraints. Endpoints and applications may function similarly oridentically to services (i.e. groups, applications and endpoints may beconsidered “modules” as are services). Therefore, the mechanismsdescribed above for services may also be used for groups, applicationsand endpoints.

[0239] In one embodiment, a peer group specification advertisement mayinclude indications of services, endpoints and initial applications ofthe peer group.

[0240] Similarly to how service implementations are correlated toservice specifications by a service specification identifier, a peergroup implementation may be correlated to a group specification by aunique identifier. This identifier may be referred to as a peer groupidentifier. A peer group specification may be a relatively largedocument. In one embodiment, since most of the peer group specificationmay only be needed if the group is to be instantiated, for publicizing agroup, a peer group specification advertisements including only a name,an identifier, and one or more keywords may be used to publish a peergroup. In one embodiment, to reduce the size of peer group specificationadvertisements, inheritance may be used between group definitions. Sincemost groups have a lot in common, a peer group specificationadvertisement may refer to another advertisement which may be common andtherefore cached. The above approaches to reducing the size of peergroup specification advertisements may be complementary.

[0241] In one embodiment, groups may load plug-in services according tothe group's implementation. In one embodiment, service descriptions maynot be required in a group advertisement. However, even if services arenot implemented via plug-ins, the existence of services may be aproperty of the group that is visible “on the wire.” Therefore, peergroup specification advertisements may list references to servicespecifications (e.g. the service specification identifier). In oneembodiment, it may be the responsibility of a group's implementation torealize the services listed in the peer group specificationadvertisement by loading a supported implementation for each service, byimplementing the service internally, or optionally using one or moreother mechanisms. In one embodiment, the service realizationmechanism(s) used is group implementation dependent.

[0242] In one embodiment, module (e.g. service) specificationadvertisements may not need to be downloaded in order to instantiate agroup unless one of the module (e.g. service) implementations needsparameters from the module (e.g. service) specification. In oneembodiment, module (e.g. service) specifications may be used by userswhen creating an implementation of the module (e.g. service).

[0243] In one embodiment, groups may need to uniquely identify each oftheir services, for example, to improve the robustness of demultiplexingservice-addressed messages. Since each service in a group belongs to aservice class, and no more than one service of each class may exist in agroup, the combination of the group identifier and the service classidentifier uniquely identify that service for service addressingpurposes.

[0244] In one embodiment, services may bind to and use each other. Inobtaining an interface to one of the other services, a service may usethe other service's class identifier to designate this other service.Services “know” each other by their role; and therefore they designateeach other by their class identifiers. For example, an implementation ofa discovery service may know that it needs a “Resolver.”

[0245] In one embodiment, for each service, a group advertisement maylist service specification identifiers for services of the group, sinceeach service specification identifier includes a corresponding serviceclass identifier. In one embodiment, to support roles, a groupadvertisement may optionally list an additional service class identifierfor each service. This identifier may differ from that embedded in thespecification identifier includes in that the former may have a rolesuffix and not the latter. In one embodiment, no two services may beassigned the same role in a given group.

[0246] In one embodiment, peer groups may have a variety ofspecifications, but may use a small number of implementations for thepeer group API itself. The specification of the peer group functionalityis the peer group specification advertisement, with its unique featuresand identifier. In one embodiment, to avoid publishing identical peergroup implementation advertisements (except for the servicespecification identifier of the group) for each group, roles may beused. Similar to services, groups may come in a small family of APIs andbehavior of the peer group class, and any number of roles for which theyare used (e.g. in the case of a group, various communities of users).Therefore, the “Role” model described for services may be extended togroups. There may be more than one class of group. Further, there may beRoles in these group classes. In one embodiment, the role identifier mayinclude the base class plus role suffix.

[0247] In one embodiment, a peer group specification advertisement mayhave two identifiers: the specification identifier that corresponds tothe particular group service specification that is being used and thefull class identifier (in one embodiment, including a role extension)that may be different for every group. In one embodiment, a servicespecification advertisement may include a class identifier in additionto a specification identifier, thereby specializing it for a given role(e.g. by changing parameters). In one embodiment, service specificationsmay be looked-up by their specification identifier, and servicespecifications may not be specialized for a role. In one embodiment,peer group specification advertisements may be looked-up byspecification identifier and role identifier. In one embodiment, notspecifying a role identifier when looking up a group may result in anerror, but may be used for browsing purposes.

[0248] In one embodiment, specifying a group may require one or more of,but may not be limited to:

[0249] Identifiers:

[0250] A peer group identifier: Identifies the community built aroundthat group. May be turned into a full class identifier when they becomedifferent from base class identifiers.

[0251] A peer group specification identifier: Equivalent to a servicespecification identifier. Identifies the behavior of the Peer Groupclass (in the programming sense) being used, not the community buildaround it.

[0252] Advertisements (may be optional or required):

[0253] Service class advertisement. In one embodiment, may be required.

[0254] Peer group specification advertisement: Name, identifier, thelist of all services, etc. May be inherited from another group. In oneembodiment, may be required. Peer group implementation advertisement:one implementation of the code that drives the group. In one embodiment,may be cached and reused. In one embodiment, may be required.

[0255] Peer Group Advertisement: an abbreviated publicizing of thegroup. In one embodiment, may be optional.

[0256] In one embodiment, describing a service may require one or moreof, but may not be limited to:

[0257] Identifiers:

[0258] Service class identifier: denotes functionality and an expectedAPI per supported binding (e.g., pipe, resolver, discovery, etc.). Inone embodiment, if there is no role suffix (role==base class), this maybe fully embedded in a service specification identifier and thereforemay need to be repeated in the group advertisement.

[0259] Service specification identifier: denotes additional on-the-wirebehavior in providing a service defined by its class (e.g., platform'spipe, Intermittent Pipe, Reliable Pipe, etc.)

[0260] Advertisements:

[0261] Service class advertisement: describes a role and may describe aper-platform set of APIs docs.

[0262] Service specification advertisement: describes a protocol andbehavior. In one embodiment, may be specialized for a role.

[0263] Service implementation advertisement: describes an implementationfor a given platform. In one embodiment, may be cached and reused.

[0264] In one embodiment, group identifiers may be constructed so thatthey are upward compatible with full class identifiers.

[0265] In one embodiment, there is one peer advertisement for each groupinstantiated on a peer. In one embodiment, a peer advertisement maydescribe only what is relevant to this group on this peer, in additionto describing the group. A peer advertisement may include one or moreof, but is not limited to, one or more parameters that are particular toone given peer for each service, a peer identifier, name and keywords.In one embodiment, a peer advertisement may include only what needs tobe published outside the peer, e.g. endpoint addresses, etc. In oneembodiment, items that affect only the local behavior or that are notspecified as being explicitly published (e.g. debug) may be left out ofthe peer advertisement and may go into an optional configurationdocument passed to the peer group object as an extra parameter. In oneembodiment, in both the configuration document and the peeradvertisement, variables may be related to services by the service classidentifier; each setting may be a <Setting> element, tagged with aservice class identifier. If there is no identifier, it means that thesetting applies to all services of this group.

[0266] The following is an example of a layout to list a service, and isnot intended to be limiting:

[0267] <Service>ServiceSpecID1</Service>

[0268] The following is another example of a layout to list a service,and is not intended to be limiting: <Service><ServiceSpecID>ServiceSpecID1</ServiceSpecID><ServiceClassID>ServiceClassID1</ServiceClassID><SomeFOtherAttribute>whatever</SomeOtherAttribute> </Service>

[0269] Similar layouts may be used for other modules such as endpoints,applications and/or groups.

[0270] In one embodiment, peer groups may be defined by servicespecification advertisements with the group identifier equivalent to therole identifier. In this embodiment, the peer group advertisement may bean abbreviated version of the service specification. In anotherembodiment, services may be listed in the implementation advertisementfor the group. In this embodiment, the implementation advertisement mayrefer to the peer group class used, with the parameter field listing theservices. The group identifier may exist only in the peer groupadvertisement, which is the root definition of the group. Using thisembodiment, there may be no need to obtain the specificationadvertisement of the group in order to instantiate it. This groupadvertisement includes the specification identifier of the group that ismatched by that specification identifier in associated implementationadvertisements, so that an implementation of the group may be acquireddirectly from the peer group advertisement without having to lookup thespecification.

[0271] In one embodiment, the implementation advertisement of a servicemay be included in-line in the implementation advertisement of a groupthat uses it, rather than including the service's specificationidentifier.

[0272] As used herein, the term “module” includes the notion of anyrandom code not part of the core system. In general, a module is ageneric, loadable “thing” that has ini( ), start( ) and stop( ) methodsor their equivalents. Applications and services may be consideredsubclasses of modules. A “Service” is a subclass of module that has “getinterface” and “get implementation advertisement” methods, making itsuitable for registration with a group. In one embodiment, modules mayalso include code that has a known API and identity (its classidentifier) and which can be looked-up with group lookup service.

[0273] In one embodiment, the peer configuration document has the formatof a peer advertisement. In one embodiment, the peer group API mayinclude one or more methods that assist in loading modules, e.g. a “loadmodule” method. In one embodiment, loading a peer group may be similarto loading any other module; one or more additional methods may beincluded to perform one or more tasks particular to loading a peergroup.

[0274] In one embodiment, the definition of a group or other module(that is, the class that implements it for which binding, and with whichparameters) is immutable. The information about the group or othermodule's instantiation on a peer (e.g. everything that may be differenton each peer, such as endpoint addresses, rendezvous status, etc) maybeen separated into a different advertisement: the peer advertisement.

[0275] In one embodiment, there may be one or more parameters that areprivate to a peer and essentially the result of a choice by the user ordefaults that depend on the particular peer that instantiates thatmodule or group (e.g. local network interfaces, well-known rendezvous,etc.). These may be similar to the content of a peer advertisement, butmay not be published (or alternatively, if published, it is by thedecision of the module and copied by that module to the peeradvertisement). The document that includes these unpublished parametersmay be a peer advertisement that may be passed as an argument to themodule's init routine. In one embodiment, providing the peeradvertisement as an argument may be optional.

[0276] The following is an exemplary initialization routine for modulesand is not intended to be limiting:

[0277] Init (group, assignedID, implAdv, configAdv);

[0278] where:

[0279] Group: The group that provides the peer-to-peer platform API tothis module: If the module is a group, this is its parent group. If thismodule is a service, group is the group of which this service is a part.If the module is an application, group is the group within which thisapplication runs.

[0280] assignedID: Assigned identifier. A unique identifier assigned tothis module by its group. If this module is a group, the assignedidentifier is its group identifier. If this module is a service, thenthis is the full class identifier of that service in that group. In oneembodiment, the full class identifier listed in the group'simplementation advertisement may be used. In one embodiment, if thismodule is a main application of a peer group, then its assignedidentifier may be a full class identifier of the base class application.In one embodiment, the role part may be assigned randomly in order to beunique. Otherwise, in one embodiment, it may be anything, includingnull. In one embodiment, a service may find its configuration parametersindexed under its assigned identifier in the configurationadvertisement, and may update its published parameters under itsassigned identifier in the peer advertisement.

[0281] implAdv: The implementation advertisement from which this modulewas loaded. In one embodiment, if this module is a subclass of astandard (base) peer group class, then the <Parm> section of thisadvertisement may include a complete list of the services that thisgroup includes. If the module is an application, the module may havebeen loaded directly from its class, bypassing the implementationadvertisement lookup. As a result, there may not be an implementationadvertisement available, in which case “null” may be passed for thisargument. In one embodiment, the standard peer group may pass animplementation advertisement to the main application(s).

[0282] configAdv: The configuration advertisement for this module. Asfor assigned identifier and implementation advertisement, this may benull if the module is an application. In one embodiment, the standardpeer group may pass its configuration advertisement through to the mainapplication(s).

[0283] One embodiment may include an initialization routine for modulesin order to avoid resorting to reflection when loading and initializingmodules. In one embodiment, modules may only include a defaultconstructor, and the initialization routine may serve as a substitute tohaving a constructor with parameters. The initialization routine,followed by a start application routine gets the module running. In oneembodiment, a “stop application” routine may shut down that module. Inone embodiment, after calling the stop application routine, the modulemay be unreferenced and garbage collected. To resume running the module,the module may be loaded from scratch again.

[0284] One embodiment may include a “start application” routine inaddition to an initialization routine in order to be able to operate onthe module once its is fully constructed but before it starts running.What “starts running” means may be defined by each module in relation tothe effects of whichever methods the particular module provides thataffect its behavior.

[0285] In one embodiment, services may be registered with the peer groupupon returning from the init routine. In this embodiment, services maybe ready to have their public methods invoked upon returning from theinitialization routine. In one embodiment, the services may not beobligated to provide full functionality. In one embodiment, publicmethods may fail gracefully if they cannot perform fully. In thisembodiment, services may expect all other services of the group to beavailable from the group's registry upon their start application methodbeing invoked, and to have the public methods of these services eitherfully work or fail nicely. In one embodiment, both the initializationand the start application methods of a module may be required to“return.” In other embodiments, either one or both of these methods maynot be required to return.

[0286] Advertisements

[0287] In one embodiment, the peer-to-peer protocols may useadvertisements to describe and publish the existence of peer resources.An advertisement may be defined as a structured, language neutralmetadata structure that names, describes, and publishes the existence ofa peer-to-peer platform resource. Network resources such as peers, peergroups, pipes, and modules such as services may be represented byadvertisements. Advertisements may be used to describe one or more of,but not limited to, peers, peer groups, pipes, content, rendezvous, andmodules such as services and other types of network resources.Advertisement types provided by the peer-to-peer platform may includeone or more of, but are not limited to, peer advertisements, peer groupadvertisements, module class advertisements, module specificationadvertisements, module implementation advertisements, pipeadvertisements, and rendezvous advertisements. Advertisements may beexchanged as documents in peer-to-peer protocol messages. One or more ofthe peer-to-peer platform protocols may use advertisements to provideinformation to entities interested in the peer-to-peer resourcesrepresented by the advertisements. Peer-to-peer platform protocols maybe used to pass advertisements between peers.

[0288] In one embodiment, advertisements may include a series ofhierarchically arranged elements. The elements may appear in arbitraryorder within the advertisement. Each element may include data oradditional elements. An element may also have attributes. In oneembodiment, attributes are name-value string pairs. An attribute may beused, for example, to store meta-data that helps to describe the datawithin the element.

[0289] In one embodiment, peer-to-peer platform advertisements may berepresented in the eXtensible Markup Language (XML). Other embodimentsmay use other encodings such as HTM or WML. In one embodiment,advertisements may be specified using a schema definition language suchas the XML Schema Definition Language. In one embodiment, XMLadvertisements may be translated into other encodings such as HTML andWML to allow peers that do not support XML to access advertisedresources.

[0290] In one embodiment, advertisements may be used in the peer-to-peerplatform as language-neutral metadata structures. In one embodiment,each software platform binding may describe how advertisements areconverted to and from native data structures such as Java objects or ‘C’structures. Each protocol specification may describe one or more requestand response message pairs. In one embodiment, advertisements may be themost common document exchanged in messages.

[0291] Information exchanged between peers may include advertisementdocuments. In one embodiment, the peer-to-peer platform may advertisedocuments to represent all of the peer-to-peer platform resourcesmanaged by the core platform, such as peers, peer groups, pipes andservices. In one embodiment, the peer-to-peer platform may define a setof core advertisements. The peer-to-peer platform may define coreadvertisement types including, but not limited to, one or more of peeradvertisements, peer group advertisements, pipe advertisements, serviceadvertisements, content advertisements, and endpoint advertisements. Inone embodiment, user-defined advertisement subtypes (for example, usingXML schemas) may be formed from these basic types. Subtypes of the coreadvertisements may be used to add an unlimited amount of extra, richermetadata to a peer-to-peer network. In one embodiment, the peer-to-peerplatform protocols, configurations and core software services operateonly on the core advertisements.

[0292] In one embodiment, an advertisement is a markup languagestructured document that names, describes, and publishes the existenceof a peer-to-peer platform resource. In one embodiment, peer-to-peerplatform advertisements may be represented in the Extensible MarkupLanguage (XML) and are therefore software platform neutral. XML providesa powerful means of representing data and metadata throughout adistributed system. XML provides universal (software-platform neutral)data because XML is language agnostic, self-describing, strongly-typedand ensures correct syntax. XML advertisements may be strongly typed andvalidated using XML schemas. XML also allows advertisements to betranslated into other encodings such as HTML and WML. This featureallows peers that do not support XML to access advertised resources. Inone embodiment, each document may be converted to and from a platformspecific representation such as a Java object. In one embodiment, peerssupporting the various protocols requiring that advertisements beexchanged in messages may accept only valid XML documents that descendfrom the base XML advertisement types.

[0293] Advertisements represented in a markup language such as XML, likeany markup language document, may be composed of a series ofhierarchically arranged elements. Each element may include its dataand/or additional elements. An element may also have attributes.Attributes are name-value string pairs. An attribute may be used tostore metadata, which may be used to describe the data within theelement.

[0294]FIG. 29A illustrates a peer in a peer-to-peer network publishingan advertisement according to one embodiment. Peer 200A may include ormay have access to resources that it may publish. Resources may include,but are not limited to, peers, peer groups, software modules (e.g.services, applications, etc.), content, pipes and pipe endpoints. Aresource advertisement may include an identifier and a securitycredential. The identifier and security credential may be compared toconfirm that they indicate the same resource when another peer accessesthe resource. In one embodiment, a public key may be associated with theadvertised resource. In one embodiment, the security credential may be apublic key signature.

[0295] Peer 200A may generate resource advertisement 808 which maydescribe how other peers may access the resource. Resourceadvertisements may be formatted according to platform-independent markuplanguage schemas defining elements of each type of advertisement (e.g.,XML). Peer 200A may allow other peers access to the resource bypublishing advertisement 808. In one embodiment, publishing may includesending advertisements to other peers. In FIG. 29A, peer 200A may sendadvertisement 808 to peers 200B and 200C in messages 820A and 820B.Messages 820A and 820B may be formatted according to a peer-to-peerplatform protocol. Another peer may discover advertisement 808 bysending a discovery query message that may include criteria that theresource corresponding to advertisement 808A may match to one or both ofpeer 200B and peer 200C, and one or both of peer 200B and peer 200Csending a response message that may contain advertisement 808 to theother peer.

[0296]FIG. 29B illustrates a peer in a peer-to-peer network publishingan advertisement to a rendezvous peer according to one embodiment. Peer200 may publish advertisement 808A by sending it to rendezvous peer 290in message 820. Rendezvous peer 290 may cache advertisements for otherpeers to discover. In one embodiment, advertisement 808A may include atime-to-live indicator (TTL). The TTL may indicate a length of timeduring which the resource advertisement is valid. When the TTL expires,peers may no longer have access to the resource advertisement. Anotherpeer may discover advertisement 808A by sending a discovery querymessage that may include criteria that the resource corresponding toadvertisement 808A may match to rendezvous peer 290, and rendezvous peer290 may send a response message that may contain advertisement 808 tothe other peer.

[0297]FIG. 30 illustrates discovering advertisements according to oneembodiment. Peer 200A may broadcast discovery query message 820.Discovery query message 820 may be formatted in accordance with apeer-to-peer platform discovery protocol. Discovery query message 820may include criteria specifying a particular type of resource in whichthe peer is interested. When the discovery query message 820 reaches apeer 200B that has advertisements 808A and 808B for resources matchingthe criteria in the discovery query message, peer 200B may respond bysending peer 200A a response message 822 that may include theadvertisements 808A and 808B. Peer 200A may also receive one or moreresponse messages from one or more other peers. Each of these responsemessages may include advertisements for resources for resources alsomatching the criteria in the discovery query message. After receivingthe resource advertisements, peer 200A may access the correspondingresource. In one embodiment, each resource advertisement may includeinformation describing how to access the particular resourcecorresponding to the resource advertisement.

[0298] One embodiment may include module class advertisements, modulespecification advertisements, and module implementation advertisementsthat may be used, for example, in describing and identifying abstractsoftware modules in peer-to-peer networking environments. FIG. 33illustrates a module class advertisement 1010, a module specificationadvertisement 1012, and a module implementation advertisement 1014 for asoftware module according to one embodiment.

[0299] In one embodiment, a module class advertisement 1010 may be usedto describe a class of software modules. A module class advertisement1010 may describe an expected local behavior and an expected API foreach peer-to-peer platform binding that supports the class of softwaremodules. A module class advertisement 1010 may provide a description ofwhat a particular module class identifier 1020 stands for. Module classidentifiers 1020 may be used by a software module or other code on thepeer-to-peer platform to designate software modules upon which thesoftware module or other code depends. In one embodiment, a module classadvertisement 1010 may not provide a completely formal description ofthe module's behavior and API. In one embodiment, a module classadvertisement 1010 may be used to create modules with a similarfunctionality.

[0300] The following illustrates an exemplary module class advertisement1010 schema that may be used in embodiments and is not intended to belimiting: <xs:element name=“MCA” type=“xxxx:MCA”/> <xs:complexTypename=“MCA”> <xs:sequence> <xs:element name=“MCID”type=“xxxx:identifier”/> <xs:element name=“Name” type=“xs:string”minOccurs=“0”/> <xs:element name=“Desc” type=“xs:anyType”minOccurs=“0”/> </xs:sequence> </xs:complexType>

[0301] where the elements may include one or more of, but are notlimited to:

[0302] MCID—Module class identifier 1020 that uniquely identifies themodule class. Each module class may have a unique identifier. In oneembodiment, this is a required element.

[0303] Name—A name associated with the module class. In one embodiment,the name is not required to be unique unless the name is obtained from acentralized naming service that guarantee name uniqueness. In oneembodiment, this is an optional element.

[0304] Desc—Description. A string that may be used to describe andsearch for a module class. In one embodiment, this is an optionalelement.

[0305] In one embodiment, a module specification advertisement 1012 maybe used to describe the specification of a software module. A modulespecification advertisement 1012 may describe an expected on-wirebehavior and protocol. A module specification advertisement 1012 mayprovide a description of what a particular module specificationidentifier 1022 stands for. A module specification identifier 1022 maybe used by a software module or other code on the peer-to-peer platformto designate a particular network-compatible family of implementationsof a given module class. In one embodiment, module specificationidentifiers 1022 may also be used by a peer group implementation todesignate the components that provide the various services that the peergroup supports. In one embodiment of the peer-to-peer platform, one ormore core peer group services (e.g. discovery, membership, resolver,etc.) may be implemented as software modules.

[0306] A module specification advertisement 1012 may also describe howto invoke and use a software module. In one embodiment, a softwaremodule may be accessed through an API (application programminginterface) of the module by locating an implementation of the softwaremodule, loading the module, and starting the module. In one embodiment,a software module may be accessed via a pipe (e.g. a peer-to-peerplatform pipe as described below) accessed using a pipe advertisementincluded in the software module's module specification advertisement1012. In one embodiment, a software module may be accessed through aproxy module accessed using a module specification identifier 1022 ofthe proxy module included in the software module's module specificationadvertisement 1012.

[0307] The following illustrates an exemplary module specificationadvertisement 1012 schema that may be used in embodiments and is notintended to be limiting: <xs:element name=“MSA” type=“xxxx:MSA”/><xs:complexType name=“MSA”> <xs:sequence> <xs:element name=“MSID”type=“xxxx:IDENTIFIER”/> <xs:element name=“Vers” type=“xs:string”/><xs:element name=“Name” type=“xs:string” minOccurs=“0”/> <xs:elementname=“Desc” type=“xs:anyType” minOccurs=“0”/> <xs:element name=“Crtr”type=“xs:string” minOccurs=“0”/> <xs:element name=“SURI”type=“xs:anyURI” minOccurs=“0”/> <xs:element name=“Parm”type=“xs:anyType” minOccurs=“0”/> <xs:elementref=“xxxx:PipeAdvertisement” minOccurs=“0”/> <xs:element name=“Proxy”type=“xs:anyURI” minOccurs=“0”/> <xs:element name=“Auth”type=“xxxx:IDENTIFIER” minOccurs=“0”/> </xs:sequence> </xs:complexType>

[0308] where the elements may include one or more of, but are notlimited to:

[0309] MSID—module specification identifier 1022. May uniquely identifythe specification. Each module specification may have a unique modulespecification identifier 1022. In one embodiment, this is a requiredelement.

[0310] Vers—The version of the specification that this advertisementadvertises. In one embodiment, this is a required element.

[0311] Name—Name that may be associated with a module specification. Thename may not be required to be unique. In one embodiment, the name maybe obtained from a centralized naming service that guarantee nameuniqueness, and therefore in this embodiment the name may be unique. Inone embodiment, this is an optional element.

[0312] Desc—Description. A string that may be used to describe andsearch for a module specification. In one embodiment, this is anoptional element.

[0313] CRTR—Creator. This element designates the creator of this modulespecification. In one embodiment, this is an optional element.

[0314] SURI—Specification URI (unique resource identifier). This elementis a URI that permits the retrieval of a document containing the modulespecification that this advertisement advertises. In one embodiment,this is an optional element.

[0315] Parm—May include one or more arbitrary parameters that may beinterpreted by each implementation.

[0316] xxxx:PipeAdvertisement—Identifies pipe advertisement which thismodule binds to an input pipe, and which thus may be used to establish apipe to a nearby running implementation of this module specification. Inone embodiment, this element name may be identical to the pipeadvertisement document type since the entire element is an embedded pipeadvertisement document. In one embodiment, this is an optional element.

[0317] Proxy—Proxy Specification identifier. Module specificationidentifier 1022 of a proxy module that may be used in order tocommunicate with modules of this specification. Note that the processmay be recursive. The proxy module may be usable via pipes, oroptionally through a subsequent proxy module, and may require asubsequent authenticator. In one embodiment, this is an optionalelement.

[0318] Auth—Authenticator specification identifier. Module specificationidentifier 1022 of an authenticator module that may be required in orderto communicate with modules of this specification. Note that the processmay be recursive. The authenticator module may be usable via pipes, oroptionally through a subsequent proxy module, and may require asubsequent authenticator. In one embodiment, this is an optionalelement.

[0319] In one embodiment, a module implementation advertisement 1024 maybe used to describe one of the implementations of a modulespecification. Implementations of a given specification may be searchedby the module specification identifier 1022. An implementation may beselected by the type of environment in which it may be used (itscompatibility statement) as well as by its name, description or thecontent of its parameters section.

[0320] A module implementation advertisement 1024 may provide amechanism to retrieve data that may be required in order to execute themodule implementation being described. In one embodiment, thisinformation may be encapsulated in the Code and PURI (Package UniformResource Identifier) elements. The interpretation of these elements maybe subject to the module's compatibility. For example, a standard peergroup implementation of a Java reference implementation may expect the<Code> element to specify a fully qualified Java class name thatdesignates a subclass such as net.xxxx.platform.Module and PURI to bethe URI (Uniform Resource Identifier) of a downloadable package (e.g. ajar file). Other execution environments may expect the code to be inlinewithin the <Code> element or even offer several options.

[0321] The following illustrates an exemplary module implementationadvertisement 1024 schema that may be used in embodiments and is notintended to be limiting: <xs:element name=“MIA” type=“xxxx:MIA”/><xs:complexType name=“MIA”> <xs:sequence> <xs:element name=“MSID”type=“xxxx:IDENTIFIER”/> <xs:element name=“Comp” type=“xs:anyType”/><xs:element name=“Code” type=“xs:anyType”/> <xs:element name=“PURI”type=“xs:anyURI” minOccurs=“0”/> <xs:element name=“Prov”type=“xs:string” minOccurs=“0”/> <xs:element name=“Desc”type=“xs:anyType” minOccurs=“0”/> <xs:element name=“Parm”type=“xs:anyType” minOccurs=“0”/> </xs:sequence> </xs:complexType>

[0322] where the elements may include one or more of, but are notlimited to:

[0323] MSID—module specification identifier 1022. May uniquely identifythe module specification being implemented. In one embodiment, this is arequired element.

[0324] Comp—Compatibility. An arbitrary element that may describe theenvironment in which this module implementation may be executed. Eachframework capable of loading and executing the module may have its ownrequirements on the contents of this element. In one embodiment, this isa required element.

[0325] Code—This arbitrary element may include anything that is neededin addition to the package in order to load and execute the code of thismodule implementation. In one embodiment, for Java moduleimplementations, this element may include a fully qualified class namecontaining the module's entry points. In one embodiment, this elementmay include the entire code.

[0326] PURI—Package URI (uniform resource identifier). This element is aURI that permits the retrieval of a package containing the code of thismodule implementation. In one embodiment, this is an optional element.

[0327] Prov—Provider. The provider of this module implementation.

[0328] Desc—Description. A string that may be used to describe andsearch for a module specification. In one embodiment, this is anoptional element.

[0329] Parm—Parameter. May include one or more arbitrary parameters thatmay be interpreted by the module implementation's code.

[0330] The following are descriptions of embodiments of peeradvertisements and peer group advertisements that may be used inembodiments of the system and method for describing and identifyingabstract software modules in peer-to-peer networking environments.

[0331] In one embodiment, a peer advertisement may be used to describe apeer. A peer advertisement may also describe resources the peer mayprovide to a peer group. One use of a peer advertisement is to holdspecific information about the peer, including one or more of, but notlimited to, the peer's name, peer identifier, peer group identifier,descriptive information, and registered services. A peer advertisementmay also include endpoint addresses and/or any run-time attributes thatindividual peer services want to publish (such as being a rendezvouspeer for a group). FIG. 6 illustrates the content of a peeradvertisement according to one embodiment.

[0332] The following illustrates an exemplary peer advertisement schemathat may be used in embodiments and is not intended to be limiting:<xs:element name=“PA” type=“xxxx:PA”/> <xs:complexType name=“PA”><xs:sequence> <xs:element name=“PID” type=“IDENTIFIER”/> <xs:elementname=“GID” type=“IDENTIFIER”/> <xs:element name=“Name” type=“xs:string”minOccurs=“0”/> <xs:element name=“Description” type=“xs:anyType”minOccurs=“0”/> <xs:element name=“Svc” type=“xxxx:serviceParams”minOccurs=“0” maxOccurs=“unbounded”/> <xs:sequence> </xs:complexType>

[0333] where the elements may include one or more of, but are notlimited to:

[0334] PID—Peer identifier that may uniquely identify the peer. Eachpeer may have a unique identifier. In one embodiment, this is a requiredelement.

[0335] GID—The peer group identifier. This element may identifycanonically which peer group this peer belongs to.

[0336] Name—A string that may be associated with the peer. In oneembodiment, the name may not be required to be unique. In oneembodiment, the name may be obtained from a centralized naming servicethat guarantees name uniqueness. In one embodiment, this is an optionalelement.

[0337] Description—A string that may be used to index and search for apeer. In one embodiment, the string is not guaranteed to be unique. Twopeers may have the same keywords. In one embodiment, this is an optionalelement.

[0338] Svc—A service element. In one embodiment, any number of serviceelements may be included. In one embodiment, ach of the service elementsmay describe the association between a group service which may bedenoted by its module class identifier (the value of an MCID (moduleclass identifier) element), and arbitrary parameters encapsulated in aParm (parameter) element. For example, all accessible endpoint addressesmay be published in association with the Endpoint Service Module ClassIdentifier. The TLS Root certificate may be published under the Peergroup Module Class Identifier (There may be a module class identifierfor a Peer Group as well). The flag that denotes that this peer is arendezvous for this group may be published under the Rendezvous Servicemodule class identifier. In one embodiment, each service may beresponsible for what is published under its module class identifier. TheService section may also optionally include an element (e.g., “isOff”)that may be used to indicate if this service is enabled or disabled.This element may be used to convey a configuration choice made by theowner of the peer.

[0339] The following is another exemplary embodiment of a peeradvertisement in XML, and is not intended to be limiting:<PeerAdvertisement> <Name>name of the peer</Name> <Keywords>searchkeywords</Keywords> <Pid>Peer identifier</Pid> <Services> <Serviceadvertisement> . . . </Service advertisement> </Services> <Endpoints><endpoint advertisement> . . . </endpoint advertisement> </Endpoint><InitialApp> <Service advertisement> . . . </Service advertisement></InitialApp> </PeerAdvertisement>

[0340] This embodiment of a peer advertisement may include, but is notlimited to, the following fields:

[0341] Name: an optional string that can be associated with a peer. Inone embodiment, the name is not required to be unique unless the name isobtained from a centralized naming service that guarantees nameuniqueness.

[0342] Keywords: an optional string that may be used to index and searchfor a peer. In one embodiment, the string is not guarantee to be unique.Two peers may have the same keywords. The keywords string may containspaces.

[0343] Peer identifier: uniquely identifies the peer. In one embodiment,this may be a required element. Each peer has a unique identifier.

[0344] Service: a service advertisement element for each servicepublished on the peer.

[0345] Services started on a peer may publish themselves to the peer. Inone embodiment, not all services running on the peer need to publishthemselves.

[0346] Endpoint: an endpoint URI (e.g. tcp://129.144.36.190:9701 orhttp://129.144.36.190:9702) for each endpoint available on the peer.

[0347] InitialApp: Optional application/service started when the peer isbooted. A service advertisement is used to describe the service.

[0348] In one embodiment, a peer group advertisement may be used todescribe, for a peer group, the group specific information (name, peergroup identifier, etc.), the membership process, and the available peergroup services. The peer group advertisement defines the core set ofservices to be used by that peer group. In one embodiment, it may notenforce that each peer must run each service locally. Rather it definesthe set of services that are made available to the peer group. In oneembodiment, a peer group advertisement may be used to describe peergroup-specific resources including one or more of, but not limited to,name, group identifier, description, specification, and serviceparameters.

[0349] In one embodiment, the initial creator of the peer group maydefine what advertisements go into the peer group advertisement atcreation time. Other peers may get a copy of the peer groupadvertisement when they discover advertisements via the discoveryservice. In one embodiment, peer group advertisements are immutableobjects and new services may not be added due to java binding. Otherembodiments may allow new services to be added. In one embodiment, apeer group may provide a registration service that allows the dynamicregistration of services.

[0350]FIG. 7 illustrates the content of a peer group advertisementaccording to one embodiment. The following is an example of oneembodiment of a peer group advertisement in XML, and is not intended tobe limiting: <peer group advertisement> <Name>name of the peergroup</Name> <Keywords>search keywords</Keywords> <Gid>Peer groupidentifier</Gid <Services> <Service advertisement> . . . </Serviceadvertisement> </Services> <InitialApp> <Service advertisement> . . .</Service advertisement> </InitialApp> </peer group advertisement>

[0351] This embodiment of a peer group advertisement may include, but isnot limited to, the following fields:

[0352] Name: an optional name that may be associated with a peer group.In one embodiment, the name is not required to be unique unless the nameis obtained from a centralized naming service that guarantee nameuniqueness.

[0353] Keywords: an optional string that may be used to index and searchfor a peer group. In one embodiment, the string is not guarantee to beunique. Two peer groups may have the same keywords.

[0354] Peer group Id: uniquely identifies the peer group. In oneembodiment, this is a required element. Each peer group has a unique id.

[0355] Service: a service advertisement element for each peer groupservice available in the peer group. In one embodiment, not all peergroup services need to be instantiated when a peer joins a peer group.In one embodiment, at least a membership service should be available, sothe membership service may implement a null authenticator membership.

[0356] InitialApp: optional application/service started when a peer isjoining a peer group. A service advertisement may be used to describethe service. The initial application may be started when a peer isjoining a group. Alternatively, it may be left to the joining peer todecide to either start or not start the peer group initial application.

[0357] The following illustrates another exemplary peer groupadvertisement schema that may be used in embodiments and is not intendedto be limiting: <xs:element name=“PGA” type=“xxxx:PGA”/> <xs:complexTypename=“PGA”> <xs:sequence> <xs:element name=“GID”type=“xxxx:IDENTIFIER”/> <xs:element name=“MSID”type=“xxxx:IDENTIFIER”/> <xs:element name=“Name” type=“xs:string”minOccurs=“0”/> <xs:element name=“Desc” type=“xs:anyType”minOccurs=“0”/> <xs:element name=“Svc”   type=“xxxx:serviceParam”minOccurs=“0”  maxOccurs=“unbounded”/> </xs:sequence> </xs:complexType>

[0358] where the elements may include one or more of, but are notlimited to:

[0359] GID—This element provides the peer group identifier. The peergroup identifier is the canonical way of referring to a group anduniquely identifies the peer group.

[0360] MSID—Peer group specification identifier. This designates themodule that provides the peer group mechanism for the group. Thespecification identifier may include an abstraction of that mechanism.This abstraction may be optionally described by a module specificationadvertisement, and one or more implementations may exist, which may eachbe described by a module implementation advertisement. In oneembodiment, these advertisements may all be searched by peer groupspecification identifier. In one embodiment, this is a required element.

[0361] Name—A name that may be associated with the peer group. In oneembodiment, the name is not required to be unique. In one embodiment,the name may be obtained from a centralized naming service thatguarantee name uniqueness. In one embodiment, this is an optionalelement.

[0362] Desc—This element provides descriptive information that may beused to index and search for a peer group. In one embodiment, thecontent of this element may not be unique. For example, two peer groupsmay have the same keywords.

[0363] Svc—Service. In one embodiment, any number of service elementsmay be included. Each service element may describe the associationbetween a group service denoted by its module class identifier (thevalue of an MCID element), and one or more arbitrary parametersencapsulated in a Parm element. This optional parameter may only bemeaningful to some services. It may be used to configure a servicespecifically in relation with its use by this group. For example, asimple membership service may find an encrypted password list there. Inone embodiment, this is an optional element.

[0364] Once a peer joins a group, that peer may receive (depending againupon membership configuration) a full membership-level peer groupadvertisement. The full membership advertisement, for example, mightinclude the configuration (required of all members) to vote for newmember approval.

[0365] In one embodiment, a pipe advertisement may be used to describean instance of a pipe communication channel. A pipe advertisement may beused by a pipe service to create associated input and output pipeendpoints. In one embodiment, a pipe advertisement document may bepublished and obtained using either the core discovery service or byembedding it within other advertisements such as the peer or peer groupadvertisement. Each pipe advertisement may include an optional symbolicname that names the pipe and a pipe type to indicate the type of thepipe (point-to-point, propagate, secure, etc). FIG. 8 illustrates thecontent of a pipe advertisement according to one embodiment. Thefollowing is an example of one embodiment of a pipe advertisement inXML, and is not intended to be limiting: <PipeAdvertisement> <Name>nameof the pipe</Name> <Identifier>Pipe identifier</Identifier> <Type>PipeType</Type> </PipeAdvertisement>

[0366] Embodiments of a pipe advertisement may include, but are notlimited to, the following fields:

[0367] Name: an optional name that may be associated with a pipe. In oneembodiment, the name is not required to be unique unless the name isobtained from a centralized naming service that guarantee nameuniqueness.

[0368] Pipe identifier: uniquely identifies the pipe. In one embodiment,this is a required element. Each pipe has a unique identifier.

[0369] Type: This is an optional pipe type that may be provided tospecify the quality of services implemented by the pipe. Pipe types mayinclude, but are not limited to:

[0370] Unicast: messages may not arrive at the destination, may bedelivered more than once to the same destination, may arrive indifferent order. Unicast, unsecure, and unreliable. This type of pipemay be used to send one-to-one messages.

[0371] Unicast secure: messages may not arrive at the destination, maybe delivered more than once to the same destination, may arrive indifferent order, but are encrypted (e.g. using TLS). Unicast, secure(e.g. using TLS). This pipe type may be similar or equivalent to theunicast pipe type, except that the data is protected using a virtual TLSconnection between the endpoints.

[0372] Propagate: a propagate (one-to-many) pipe. Diffusion pipes. Thispipe type is used to send one-to-many messages. Any peer that hasenabled an input pipe on a propagate-type pipe may receive messages thatare sent on the pipe.

[0373] In one embodiment, a service advertisement may be used todescribe a peer-to-peer platform-enabled service. In one embodiment,service advertisements may describe how to activate and/or use theservice. In one embodiment, a peer-to-peer platform-enabled service is aservice that uses pipes as primary invocation mechanism. To invoke theservice, a peer may a message to the associated service pipe. In oneembodiment, the core peer group services that each peer group mayimplement in order to respond to the messages described for thepeer-to-peer platform protocols are peer-to-peer platform-enabledservices and thus may be published using service advertisements. Theservice advertisement document may be published and obtained using thepeer information protocol for peer services, or alternatively using thepeer group discovery protocol for peer group services.

[0374] In one embodiment, a pipe advertisement and access method fieldsmay provide a placeholder for any kind of service invocation schema thatdefines the valid set of XML messages accepted by the service and theassociated message flow. Thus, the peer-to-peer platform protocols maybe agnostic of service invocation and interoperate with any existingframework. A service advertisement access method field may refer to aWSDL (e.g. www.w3.org/TR/wsdl), ebXML (e.g. www.ebxml.org), UPnP (e.g.www.upnp.org) or a client-proxy schema, among others. For example, aWSDL access method may define messages that are abstract descriptions ofthe data being exchanged and the collections of operations supported bythe service using a WSDL schema. In one embodiment, a serviceadvertisement may include multiple access method tags, as there may bemultiple ways to invoke a service. Thus, the peer may ultimately decidewhich invocation mechanism to use. For example, small devices may wantto use a small-footprint mechanism or a service framework they alreadyhave the code for, and larger devices may decide to download aclient-proxy code.

[0375] In one embodiment, the access method for services is a schema ofvalid XML messages accepted by the service. In one embodiment, a serviceadvertisement may contain a URL or URI tag to point to a jar file, DLL,or loadable library. A peer may use this to download the code to run theservice, for example if the peer joins the peer group and does not havethe required code to run the service.

[0376] One embodiment may provide cross-platform activation of services.A peer may be implemented on a first computing platform. The maydiscover an advertisement for service that includes platform-independentactivation instructions for a service implemented on a second computingplatform, different from the first computing platform. The peer maycarry out the instructions to activate the service even though theircomputing platforms are different. For example, a peer implemented on aMacintosh OSX computing platform may activate a search engine for usedcars implemented on an Intel Windows computing platform.

[0377]FIG. 9 illustrates the content of a service advertisementaccording to one embodiment. The following is an example of oneembodiment of a service advertisement in XML, and is not intended to belimiting: <ServiceAdvertisement>  <Name> name of the Service</Name> <Version> Version identifier </Version>  <Keywords>search keywords</Keywords>  <Id> Service identifier </Id>  <Pipe> Pipe endpoint toaccess the service </Pipe>  <Params> service configuration parameters</Params>  <URI> service provider location </URI>  <Provider> ServiceProvider </Provider>  <AccessMethods>   ...  </AcessMethods></ServiceAdvertisement>

[0378] Embodiments of a service advertisement may include, but are notlimited to, the following fields:

[0379] Name: an optional name that may be associated with a service. Inone embodiment, the name is not required to be unique unless the name isobtained from a centralized naming service that guarantees nameuniqueness.

[0380] Keywords: an optional string that may be used to index and searchfor a service. In one embodiment, the string is not guaranteed to beunique. Two services may have the same keywords.

[0381] Service Id: uniquely identifies a service. In one embodiment,each service has a unique id. In one embodiment, this element may berequired.

[0382] Version: specifies the service version number. In one embodiment,this element may be required.

[0383] Provider: gives information about the provider of the service.This will typically be a vendor name. In one embodiment, this elementmay be required.

[0384] Pipe: an optional element that specifies a pipe advertisement tobe used to create an output pipe to connect to the service. In oneembodiment, services are not required to use pipes.

[0385] Params: a list of configuration parameters available to the peerwhen invoking the service. In one embodiment, the parameter field isoptional. Parameters may be defined as a list of strings.

[0386] URI: This is an optional parameter that may be used to specifythe location of where the code for the service may be found.

[0387] Access Methods: In one embodiment, at least one access method isrequired to specify how to invoke the service. Multiple access methodtags may be used when multiple access methods are available. The accessmethod tag allows any kind of service invocation representation to bespecified. For example the access method may be a placeholder for a WSDLor uPnP document that describes a web service access method.

[0388] In one embodiment, a content advertisement may be used todescribe a content document stored somewhere in a peer group. In oneembodiment, there are no restrictions on the type of contents that canbe represented. A content may be a file, a byte array, code or processstate, for example. In one embodiment, each item of content may have aunique identifier also known as its canonical name. The uniqueidentifier may include a peer group universal unique identifier (UUID),and also may include another name that may be computed, parsed, andmaintained by peer group members. In one embodiment, the content's nameimplementation within the peer group is not mandated by the peer-to-peerplatform. The name may be a hash code, a URI, or a name generated by anysuitable means of uniquely identifying content within a peer group. Theentire canonical content name may be referred to as a content identifieror content identifier. FIG. 3 illustrates an exemplary contentidentifier according to one embodiment.

[0389]FIG. 10 illustrates a content advertisement according to oneembodiment. In one embodiment, a size element may be provided for allcontent items and gives the total size of the content. In oneembodiment, the size is in bytes. In one embodiment, the size is a long(unsigned 64-bits). A content advertisement may also include a MIME(Multi-Purpose Internet Mail Extensions) type that describes the MIMEtype (encoding may be deduced from the type) of the in-line orreferenced data. A content advertisement may also include a RefIDelement. If the advertised content is another advertisement (based uponits type), the RefID is the content identifier of the referencedcontent. If the advertised content is not another advertisement, theRefID element may be omitted.

[0390] The following is an example of one embodiment of a contentadvertisement in XML, and is not intended to be limiting:<ContentAdvertisement>  <Mimetype> name of the pipe</Mimetype>  <Size>Pipe identifier </Size’  <Encoding> Pipe Type </Encoding>  <identifier>Content identifier</identifier>  <RefID> Content identifier </RefID> <Document> document </Document> </ContentAdvertisement>

[0391] Embodiments of a content advertisement may include, but are notlimited to, the following fields:

[0392] identifier: in one embodiment, all contents have a unique id.

[0393] Size: the total size of the content. In one embodiment, a long(unsigned 64-bits) represented as a string. “−1” indicates that the sizeis unknown.

[0394] Mimetype: the mime type of the content. The type may be unknown.

[0395] Encoding: specifies the encoding used.

[0396] RefID: if the advertised content is about another content, theRefID specifies the content identifier of the referenced content.

[0397] In one embodiment, an endpoint advertisement may be used todescribe peer transport protocols. In one embodiment, a peer may supportone or more transport protocols. In one embodiment, peers may havemultiple network interfaces. Typically, there will be one peer endpointfor each configured network interface and/or protocol (e.g. TCP/IP,HTTP). An endpoint advertisement may be included as a tag field in apeer advertisement to describe the endpoints available on the memberpeer. In one embodiment, an endpoint advertisement document may bepublished and obtained using either the core discovery service or byembedding it within other advertisements such as the peer advertisement.Each endpoint advertisement may include transport binding informationabout each network interface or transport protocol. Endpoints may berepresented with a virtual endpoint address that may include allnecessary information to create a physical communication channel on thespecific endpoint transport. For example, “tcp://123.124.20.20:1002” or“http://134.125.23.10:6002” are string representing endpoint addresses.FIG. 11 illustrates the content of an endpoint advertisement accordingto one embodiment. The following is an example of one embodiment of anendpoint advertisement in XML, and is not intended to be limiting:<EndpointAdvertisement>  <Name> name of the endpoint</Name>  <Keywords>serach string </Keywords>  <Address> endpoint logical address </Address></EndpointAdvertisement>

[0398] Embodiments of an endpoint advertisement may include, but are notlimited to, the following fields:

[0399] Name: an optional name that may be associated with an endpoint.In one embodiment, the name is not required to be unique unless the nameis obtained from a centralized naming service that guarantee nameuniqueness.

[0400] Keywords: an optional string that may be used to index and searchfor an endpoint. In one embodiment, the string is not guarantee to beunique. Two endpoints may have the same keywords.

[0401] Peer-to-Peer Platform Protocols

[0402] The peer-to-peer platform protocols may be used to provide andsupport ad hoc, pervasive, and multi-hop peer-to-peer (P2P) networkcomputing. Using the protocols, peers can cooperate to formself-organized and self-configured peer groups independently of theirpositions in the network (e.g., edges, firewalls, network addresstranslators, public vs. private address spaces, etc.), and without theneed of a centralized management infrastructure. The peer-to-peerplatform protocols may have very low overhead, make few assumptionsabout the underlying network transport and limited requirements of thepeer environment, and may be used to deploy a wide variety ofpeer-to-peer applications and services in a highly unreliable andchanging network environment.

[0403] In one embodiment, the peer-to-peer platform protocols maystandardize the manner in which peers self-organize into peer groups,publish and discover peer resources, communicate, and monitor eachother. The peer-to-peer platform protocols may allow the establishmentof a virtual network overlay on top of physical networks, allowing peersto directly interact and organize independently of their networklocation and connectivity. Embodiments of the peer-to-peer platformprotocols may be implemented on unidirectional links and asymmetrictransports.

[0404] In one embodiment, the peer-to-peer platform may include coreprotocols including one or more of, but not limited to, a peermembership protocol, a peer discovery protocol, a peer resolverprotocol, a peer information protocol, a pipe binding protocol, anendpoint routing protocol, and a rendezvous protocol. In one embodiment,a peer membership protocol may allow a peer to join or leave peergroups, and to manage membership configurations, rights andresponsibilities. In one embodiment, a peer discovery protocol may beused to publish and discover resource advertisements. In one embodiment,a peer resolver protocol may be used to send a generic query to one ormore peers, and receive a response (or multiple responses) to the query.In one embodiment, a peer information protocol may be used by a peer toobtain status information about another peers. In one embodiment, a pipebinding protocol may be used by a peer to establish a virtualcommunication channel or pipe between one or more peers. In oneembodiment, an endpoint routing protocol may be used by a peer todiscover a route (sequence of hops) to send a message to another peer,potentially traversing firewalls and NATs. In one embodiment, arendezvous protocol may be used for propagating messages within a peergroup.

[0405] The core peer-to-peer platform protocols may be implemented usinga common messaging layer. This messaging layer binds the protocols tovarious network transports. In one embodiment, the peer-to-peer platformprotocols may be specified as a set of markup language (e.g. XML)messages exchanged between peers. Each software platform bindingdescribes how a message is converted to and from a native datastructures such as a Java object or ‘C’ structure. In one embodiment,the use of markup language messages to define protocols allows manydifferent kinds of peers to participate in a protocol. Each peer is freeto implement the protocol in a manner best suited to its abilities androle. Peer-to-peer platform messages are described previously in thisdocument.

[0406] In one embodiment, each of the protocols is independent of theothers. In one embodiment, a peer may not be required to implement allof the networking protocols. A peer may implement only the protocol thatit requires. For example, a device may have all the advertisements ituses pre-stored in memory, so that peer does not need to implement thepeer discovery protocol. As another example, a peer may use apre-configured set of peer routers to route all its messages, hence thepeer does not need to implement the peer endpoint protocol. Instead, thepeer sends messages to the routers to be forwarded. As yet anotherexample, a peer may not need to obtain or wish to provide statusinformation to other peers, hence the peer does not to implement thepeer information protocol. The same can be said about all of the otherprotocols. In one embodiment, a peer may implement only a portion(client-side or server-side only, for example) of a protocol.

[0407] Peers may use the peer-to-peer platform protocols to advertisetheir resources and to discover network resources (services, pipes,etc.) available from other peers. Peers may form and join peer groups tocreate special relationships. The peer-to-peer platform protocols mayallow peers to communicate without needing to understand or manage thepotentially complex and dynamic network topologies that are becomingcommon. Peers may cooperate to route messages allowing for full peerconnectivity. The peer-to-peer platform protocols allow peers todynamically route messages across multiple network hops to anydestination in the network (potentially traversing firewalls). Eachmessage may include either a complete or a partial ordered list ofgateway peers through which the message might be routed. If routeinformation is incorrect, an intermediate peer may assist in dynamicallyfinding a new route. In one embodiment, a peer-to-peer platform protocolmessage that is routed through multiple hops may not be assumed to bereliably delivered, even if only reliable transports such as TCP/IP areused through all hops. A congested peer may drop messages at any timerather than routing them.

[0408] The peer-to-peer platform protocols may be implemented on avariety of networks including, but not limited to, the Internet,corporate intranets, dynamic proximity networks, home networkingenvironments, LANs and WANs. The peer-to-peer platform protocols mayallow the peer-to-peer platform to be easily implemented onunidirectional links and asymmetric transports. In particular, manyforms of wireless networking do not provide equal capability for devicesto send and receive. The peer-to-peer platform permits anyunidirectional link to be used when necessary, improving overallperformance and network connectivity in the system. Thus, thepeer-to-peer platform protocols may be easy to implement on anytransport. Implementations on reliable and bidirectional transports suchas TCP/IP or HTTP may provide efficient bidirectional communications.Even on bidirectional transports, communication ability between any pairof peers may at times not work equally well in both directions. That is,communications between two peers will in many cases be able to operatebidirectionally, but at times the connection between two peers may beonly unidirectional, allowing one peer to successfully send messages tothe other while no communication is possible in the reverse direction.The peer-to-peer platform unidirectional and asymmetric transport alsoplays well in multi-hop network environments where the message latencymay be difficult to predict. Furthermore, peers in a P2P network tend tohave nondeterministic behaviors and thus may appear or leave the networkvery frequently.

[0409] In one embodiment, the peer-to-peer platform protocols do notrequire a broadcast or multicast capability of the underlying networktransport. Messages intended for receipt by multiple peers (propagation)may be implemented using point-to-point communications. In oneembodiment, the peer-to-peer platform protocols may not require periodicmessages of any kind at any level to be sent within the network, andthus may not require periodic polling, link status sensing, or neighbordetection messages, and may not rely on these functions from anyunderlying network transport in the network. This entirely on-demandbehavior of the protocols and lack of periodic activity may allow thenumber of overhead messages generated by the peer-to-peer platform toscale all the way down to near or at zero, when all peers are stationarywith respect to each other and all routes needed for currentcommunication have already been discovered.

[0410] In one embodiment, the peer-to-peer platform protocols aredefined as idempotent protocol exchanges. The same messages may besent/received more than once during the course of a protocol exchange.In one embodiment, no protocol states are required to be maintained atboth ends. Due to the unpredictability of P2P networks, assumptions maynot be made about the time required for a message to reach a destinationpeer, and thus in one embodiment the peer-to-peer platform protocols maynot impose timing requirements for message receipt.

[0411] The peer-to-peer platform protocols may take advantage ofadditional optimizations, such as the easy ability to reverse a sourceroute to obtain a route back to the origin of the original route.

[0412]FIG. 12 illustrates protocols and bindings in a peer-to-peerplatform according to one embodiment. When the peer-to-peer platformprotocols are implemented using a particular programming language andover a particular transport protocol, the implementation is an instanceof a peer-to-peer platform binding 220, where the peer-to-peer platformprotocols are bound to the language and the transport layer. In oneembodiment, protocol and peer software implementation issues may bedefined in documents specific to the binding. A binding documentdescribes how the protocols are bound to an underlying network transport(such as TCP/IP or UDP/IP) or to a software platform such as Java 222 ora native software platform 224 such as UNIX.

[0413] The following describes the transport binding of the peer-to-peerplatform protocols over TCP/IP including the message wire format ofpeer-to-peer platform endpoint messages over a TCP/IP socket connectionaccording to one embodiment. Each TCP/IP message may include a headerand a body. In one embodiment, the format of the header is:

[0414] Type Source IP address Source Port Size Option Unused

[0415] The type may include information used to either unicast ormulticast the request. The type may indicate whether this is a propagatemessage, a unicast message, an ACK or a NACK. The port may allow eachpeer to decide to bind its transport service to a specific port number.The TCP binding may not require that a specific port be used. The sizemay indicate the body size (not including the header). The option may beused to specify the kind of socket connections (uni- or bidirectional)in use. The TCP/IP binding does not require the maintenance of anystates. The normal operation is for one peer to send a TCP/IP packet toanother one, and to close the socket after the packet is sent. This isthe minimum functionality required to implement unidirectional pipes. Inone embodiment, if the receiving end decides to keep the connectionactive (socket “keep alive”), it may return an indicator to the senderto tell the sending end that it is keeping the connection alive. Thesending end may reuse the same socket to send a new packet.

[0416] The following describes the transport binding of the peer-to-peerplatform protocols over HTTP including the wire message format for theHTTP binding of the peer-to-peer platform protocols. An HTTP requestformat message may include a header and a body using an HTML format. Forexample: <HTML>  <Code> Header </Code>  <Msg> Body </Msg> </HTML>

[0417] The header allows the receiving end to determine which messagetype is received. Message types may include request succeeded, requestfailed, empty (no body) and response (the body is not empty and containsdata). The body may be represented as a string in the HTML requestdocument. Connection states that may be used include, but are notlimited to:

[0418] Peer Connection: Before a message can be sent to a HTTP serverpeer, the HTTP client may be required to send a request for connectionto the other peer. The request for connection message may use the emptyheader type. The message may be sent using a GET request to thefollowing server URL: http://ip-name:port/reg/client-peerid/. ip-namespecifies the IP of the server peer and the port is the correspondingserver port number (8080 for example). The server replies with an emptymessage containing either a request succeeded or request failed headertype. The peer connection message may be used to create a client sessionon the receiving peer. The receiving peer may decide to reject theconnection and refuse the client connection. This corresponds to aclient registration.

[0419] Message Sending: To send a message to another peer server, theclient sends a message of the response type with a message body part.The server replies with an ok or failed message. The message is sent tothe following URL using the PUT method: http://ip-name:port/snd/. Theserver replies with a message including a request succeeded or requestfailed header type.

[0420] Message Retrieving: To retrieve messages from a peer server, theclient may send a GET request message with the empty header tag to thefollowing URL: http://ipname:port/rec/client-peerid/. The server replieswith may respond with a message failed message or with a Content messageincluding the messages retrieved.

[0421] Peer Discovery Protocol

[0422] In one embodiment, the peer-to-peer platform may include a peerdiscovery protocol that may allow a peer to find advertisements on otherpeers. The peer discovery protocol may be used to discover any publishedpeer resources including other peers, peer groups, pipes, softwaremodules (e.g. services and applications) and any other resource that hasan advertisement in the peer-to-peer network. This protocol may be usedto find members of any kind of peer group, presumably to requestmembership. In one embodiment, the peer discovery protocol is thedefault discovery protocol for all peer groups, including the world peergroup. The discovery protocol may be used as a default discoveryprotocol that allows all peer-to-peer platform peers to understand eachother at a very basic level.

[0423] The peer discovery protocol may provide, at the lowest level, theminimum building blocks for propagating discovery requests betweenpeers. Thus, the peer discovery protocol may provide the essentialdiscovery infrastructure for building high-level discovery services. Inmany situations, discovery information is better known by a high-levelservice, because the service may have a better knowledge of the topology(firewall traversal), and the connectivity between peers. The peerdiscovery protocol may provide a basic mechanism to discoveradvertisements while providing hooks so high-level services andapplications can participate in the discovery process. Services may beable to give hints to improve discovery (i.e. decide whichadvertisements are the most valuable to cache).

[0424] In one embodiment, the peer discovery protocol may be based onweb crawling and the use of rendezvous peers. Rendezvous peers are peersthat offer to cache advertisements to help others peers discoverresources, and propagate requests they cannot answer to other knownrendezvous peers. Rendezvous peers and their use in the discoveryprocess are discussed later in this document.

[0425] In one embodiment, custom discovery services may choose toleverage the peer discovery protocol. In one embodiment, if a peer groupdoes not have its own discovery service, the peer discovery protocol maybe used as the method for probing peers for advertisements. Rendezvouspeers may keep a list of known peers and peer groups. This list may ormay not be exhaustive or timely. A custom discovery service (if it knewthat the region's rendezvous did keep a timely exhaustive list), forexample, may discover all peers in the region by sending a singlemessage to the rendezvous peer.

[0426] In one embodiment, peer discovery may be done with, oralternatively without, specifying a name for the peer to be locatedand/or the group to which peers belong. When no name is specified, alldiscovered advertisements of the requested type may be returned. If aprobing peer provides the name of the peer to be located, a simpletranslation may be requested that returns that peer's advertisement.Once a peer is discovered, ping, status, and capability messages may besent to its “main” endpoint(s) using a peer information protocol. Peersmay export more than one endpoint. In one embodiment, each peerdesignates at least one primary endpoint to handle the low-levelhousekeeping protocols such as the peer discovery protocol and the peerinformation protocol.

[0427] In one embodiment, the peer discovery protocol may be used toprobe network peer groups looking for peers that belong to specifiedpeer groups. This process may be referred to as screening. Peers may bescreened for membership by presenting each candidate member with a peergroup name (string matched with the peer group advertisement canonicalname). In one embodiment, peers claiming to belong to this group mayrespond, while other peers do not respond. The peer discovery protocolmay be used to discover any type of core advertisement including, butnot limited to: peer advertisements, peer group advertisements, pipeadvertisements and service advertisements.

[0428] Peer groups need customizable and adaptable discovery policies.In one embodiment, the peer-to-peer platform may be policy-agnostic, andmay only provide the basics for discovery. The basics may include one ormore core discovery protocols including, but not limited to, a propagateprotocol (broadcast within a scope range (subnet or peer groupmembers)), a rendezvous protocol (unicast to a trusted discovery peer)and an invite protocol (reverse discovering).

[0429] A discovery policy may be implemented in a discovery servicebased on the core discovery protocol. In one embodiment, a discoveryservice in the core peer-to-peer platform may be used to discoverabstractions and/or entities in the peer-to-peer network including, butnot limited to, peers, peer groups, peer group policies (group definedservices) and pipe endpoints.

[0430] In some embodiments of a peer-to-peer platform, the discoveryservice may rely on trusted peers (discovery proxies). The discoveryservice may leverage local neighbors (local propagate). The discoveryservice may use rendezvous peers (indexes). The discovery service mayleave traces in discovery proxies (cache). The discovery service may usenet crawling as a last resort (propagate between trusted discoveryproxies). In one embodiment, a discovery service may not discover someentities in the peer-to-peer network including, but not limited to,content (large scale; in one embodiment, a content management servicemay be used for content discovery), metadata (maintain relationshipbetween data), users, and applications.

[0431] Embodiments of a peer-to-peer platform discovery service mayleverage surrounding peers and peer groups, provide meetings points forfar away peers and groups, use an asynchronous protocol and providereverse discovery. In one embodiment, the discovery service may be usedto find new neighbor peers and provide the ability for a peer to learnabout other peer's abilities. Embodiments of a discovery service in thepeer-to-peer platform may provide extensibility, spontaneousconfiguration, adaptive connectivity, a dynamic (i.e. no fixed) networktopology, and the ability to reach the “edge of the Internet” (firewall,and NAT).

[0432] Some embodiments of a discovery method in the peer-to-peerplatform may not require centralized naming (e.g. no DNS). In oneembodiment, a discovery service may provide predefined meeting pointsthat may be used in platform bootstrapping. In one embodiment, thediscovery service may support a dynamic environment (peers may come andgo). In one embodiment, the discovery service may support an unreliableenvironment (peers may fail). In one embodiment, the discovery servicemay help to adapt to a changing environment through viral behavior. Inone embodiment, the discovery service may be used to improve performanceas a system ages (increase locality). In one embodiment, the discoveryservice may be used in support of security (change of physicallocation). In one embodiment, a discovery service may be used thatprovides administrationless discovery (zero-admin).

[0433] Embodiments of the peer-to-peer platform discovery service mayallow a peer to learn about other peers that discover it. In oneembodiment, the peer-to-peer platform discovery service may provideapplication-managed rendezvous. In one embodiment of the peer-to-peerplatform, a peer discovery protocol may support a discovery querymessage and a discovery response message to be used in the peerdiscovery process.

[0434] Peer groups need customizable and adaptable discovery policies.One approach to implementing a discovery policy is to start simple andbuild more complex policies. Embodiments of the peer-to-peer platformdiscovery service may support discovery methods including, but notlimited to:

[0435] Propagate Discovery

[0436] Unicast to predefined rendezvous

[0437] Leverage transport dependent multicast (e.g. IP)

[0438] Unicast Discovery

[0439] Unicast to known rendezvous for forward propagation

[0440] May be used for reverse Discovery

[0441] In one embodiment, the peer-to-peer platform may not mandateexactly how discovery is done. Discovery may be completelydecentralized, completely centralized, or a hybrid of the two.Embodiments of the peer-to-peer platform may support discoverymechanisms including, but not limited to:

[0442] LAN-based discovery. This is done via a local broadcast over thesubset.

[0443] Discovery through invitation. If a peer receives an invitation(either in-band or out-of-band), the peer information contained in theinvitation may be used to discover a (perhaps remote) peer.

[0444] Cascaded discovery. If a peer discovers a second peer, the firstpeer may, with the permission of the second peer, view the horizon ofthe second peer to discover new peers, groups, and services.

[0445] Discovery via rendezvous points. A rendezvous point is a specialpeer that keeps information about the peers it knows about. A peer thatcan communicate via a rendezvous peer, for example via a peer-to-peerprotocol pipe, may learn of the existence of other peers. Rendezvouspoints may be helpful to an isolated peer by quickly seeding it withlots of information. In one embodiment, a web site or its equivalent mayprovide information of well-known peer-to-peer protocol rendezvouspoints.

[0446] In one embodiment, a peer-to-peer platform web of trust may beused. In a web of trust, a peer group creator may select initialdiscovery proxies, and may delegate to new peer members. Any peer, whentrusted, can become a discovery proxy. Discovery proxies may propagaterequests between each other for net-crawling discovery. New peers may beuntrusted or low-trust peers, and may be typically difficult to find andhave limited discovery range (this may help protect against misbehaviorsand denial of service attacks). Trusted members are easier to discover.Peers may increase their discovery range as they become more trusted(discovery credential). Some peers may not need to discover beyond theirinitial net peer group range.

[0447] In one embodiment, a peer may go through a proximity network,which also may be referred to as a subnet or region, to try to find(discover) surrounding peers. The Internet includes the concept ofsubnets that are physically defined by physical routers that defineregions in which computer systems are connected to one another. Withinone of these regions, the peer-to-peer protocol uses multicast or otherpropagate mechanism to find peers. In one embodiment, a propagatediscovery mechanism may be provided where one peer can propagate adiscovery request through a local subnet. Peers that are in the subnetmay respond to the discovery request. The propagate discovery mechanismmay provide primarily close range discovery. In one embodiment, onlypeers that are in the same physical subnet (region) may respond.“Propagate” is at the conceptual level. Multicast is implemented byTCP/IP to provide propagate capabilities. Other transports may use othermethods to implement propagate. For example, Bluetooth provides adifferent implementation of propagate which is not multicast.

[0448] The core discovery protocol may provide a format for a local peerto send a propagate message (a request to find information about otherpeers or peer groups in its local region or subnet) and a format for aresponse message. A propagate may ask who is there (what peers are inthe subnet). One or more peers may decide to respond. Other peers on thesubnet may choose not to respond if they do not want to be discovered bythe requesting peer. The response message may indicate that a peer isthere and that the requesting peer may communicate with it if it wantsmore information. In one embodiment, the core peer-to-peer platform maydefine the format of the discovery requests and responses as part of thepeer discovery protocol. In one embodiment, the messages may be XMLmessages.

[0449] One embodiment of a peer-to-peer platform may provide abootstrapping process for peers. In one embodiment, a new peer may notknow any peers or peer groups when bootstrapped. When bootstrapping, thepeer may issue a peer discovery propagate message. The new peer islooking for one or more peers in the subnet. The new peer needs to reachsome level of connectivity in order to support higher-level operations.From discovered peers, the new peer may acquire information needed toallow the new peer to go further in its bootstrapping process. Forexample, the new peer may send messages to another peer requestinginformation on services that the other peer may be aware of that the newpeer needs for bootstrapping.

[0450] When the new peer discovers another peer or peers, it may attemptto discover peer groups. This process may be similar to the peerdiscovery process described above. The new peer may send (e.g.propagate) another discovery message that is configured to discover peergroups. Peers in the proximity network (region) that are aware of a peergroup or peer groups may respond to the peer group discovery message,and may return information on the peer group(s) (e.g. peer groupadvertisements) of which they are aware. The new peer may use thisinformation to determine a peer group or peer groups that it may beinterested in joining.

[0451] In one embodiment, a peer group may be configured so that only asubset of peers within a group may have the capabilities to respond topeer group discovery messages and to provide information about the peergroup to inquiring peers.

[0452] Peer and peer group discovery may both be implemented by the peerdiscovery protocol. Peer and peer group discover are more or less at thesame level in the P2P platform. In one embodiment, peer discovery mayuse a message that indicates the discovery is looking for peers, andpeer group discovery may use a similar message that indicates thediscovery is looking for peer groups.

[0453] In one embodiment, the peer discovery protocol may be required tobe implemented in a peer platform, and thus all peers will have theservice running. When one peer sends (e.g. propagates) a request, then areceiving peer must send a response, unless it is configured to notrespond to at least some requests from at least some peers based uponconfiguration parameters. In another embodiment, peers may beimplemented without the peer discovery protocol. In other words, in thisembodiment, peers are not required to implement the peer discoveryplatform. For example, on some smart devices, peer information and/orpeer group information may be preconfigured into the device, and sobootstrapping may be performed on these devices without having toinitiate a peer discovery.

[0454] Embodiments of the peer-to-peer platform may implement adiscovery mechanism that is more suited for long-range discovery thanthe propagate method described above. In one embodiment, rendezvouspeers may be used in discovery. A rendezvous peer may be described as ameeting point where peers and/or peer groups may register to bediscovered, and may also discover other peers and/or peer groups, andretrieve information on discovered peers and/or peer groups. In oneembodiment, a peer (any peer) in a peer group may decide to become ormay be appointed or elected as a rendezvous peer in the group. Therendezvous peer may be advertised as a meeting point, and may bepredefined on peers so that, for example, the peers, when starting up,may know to go to the rendezvous peer to find information about thepeer-to-peer network. Rendezvous peers may act as information brokers orcentralized discovery points so that peers can find information in aneasy and efficient manner. As a peer group grows, a peer may become arendezvous peer in the group. In one embodiment, a network of rendezvouspeers may be constructed that may help to provide long-range discoverycapabilities. A rendezvous peer may be aware of at least some of theother rendezvous peers in the network, and a discovery message from apeer may be forwarded from a first rendezvous peer to a second, and soon, to discover peers and/or peer groups that are “distant” on thenetwork from the requesting peer.

[0455] Rendezvous peers may offer to cache advertisements to help otherspeers discover resources, and may propagate (forward) requests theycannot answer to other known rendezvous peers. In one embodiment, arendezvous peer implements at least one of these two functions. Theservices provided by a rendezvous peer may be different than messagerouting. Message routing is performed at a lower level involvingmulti-hops connections to send a message between any peers in thenetwork. In one embodiment, the forwarding of a request between tworendezvous peers may involve routing to propagate a request between tworendezvous, but this is transparent to the rendezvous service and doneunderneath.

[0456] In one embodiment, rendezvous peers may forward requests betweeneach other. A rendezvous may be typically connected to a few otherrendezvous peers. There may be as many rendezvous peers as peers in apeer group. Not every peer may be a rendezvous (e.g. if a peer has nocaching capabilities or is isolated behind a firewall). In oneembodiment, only rendezvous peers may forward a discovery request toanother rendezvous peer. This restriction may serve to limit and controlthe exponential growth of request propagations within the network.Rendezvous peers may thus provide a simple throttle mechanism to controlthe propagation of requests. In one embodiment, sophisticated rendezvouspeers may be deployed to filter and distribute requests for the bestusage of network resources.

[0457] In one embodiment, a peer may be pre-configured with apre-defined set of rendezvous peers. These bootstrapping rendezvous mayhelp the peer discover enough network resources (peers, rendezvous,services) as it needs to support itself. In one embodiment, thepre-configured rendezvous are optional. A peer may be able to bootstrapby finding rendezvous or enough network resources in its proximityenvironment. If a peer does not know the information, it may ask thesurrounding peers (hop of 1) if they know the answer. One or more peersmay already have the answer. If no surrounding peers know the answer,the peer may ask its rendezvous peers to find advertisements. Peers arerecognized as rendezvous peers in their peer advertisements. When a peerdiscovers a new peer, it can determine if this peer is a rendezvous. Apeer may not be required to use all the rendezvous peers that it hasdiscovered.

[0458] Rendezvous peers may forward requests between themselves. Thediscovery process continues until one rendezvous peer has the answer orthe request dies. There is typically a Time To Live (TTL) associatedwith the request, so it is not infinitely propagated. As an example,suppose a peer A is attempting to discover a resource R on the network.Peer A issues a discovery request specifying the type (peer, peer group,pipe, service) of advertisements it is looking for. To initiate theDiscovery, peer A sends a discovery request message as a singlepropagate packet to all its available endpoints. The packet may containthe requested peer advertisement, so the receiving peer can respond tothe requester. Each discovery request identifies the initiator, and aunique request identification specified by the initiator of the request.When another peer receives the discovery request (assume peer B in thisexample), if it has the requested R advertisement, it will return topeer A the advertisement for R in a discovery response message. If PeerA does not get response from its surrounding peers (hop of 1), Peer Amay send the request to its known rendezvous peers. If the rendezvouspeers do not have the advertisement, they can propagate the request toall other rendezvous peers they know. When a rendezvous receives arespond to a request, the rendezvous may cache the R advertisement forfuture usage, before sending it to the requestor.

[0459] In one embodiment, the peer rendezvous capabilities may beembedded in the core discovery protocol of the peer-to-peer platform.Rendezvous peers may be protocol-based, and may broker more informationthan name servers that typically only broker names of entities. In oneembodiment, a rendezvous peer may maintain indexes for entities in thepeer-to-peer platform including peers, peer groups, and advertisements.Indexes may be dynamic indexes that may grow as the peer group communitygrows and more peers join. As a group joins, some peers may decide tobecome rendezvous peers to help peers connect with other peers in thegroup.

[0460] The rendezvous peer is at the peer level. A rendezvous peer isnot a “service.” A rendezvous peer may be used as part of aninfrastructure to construct services such as a DNS or other centralizingand index services. In one embodiment, services may interact with arendezvous peer to obtain and/or manipulate information stored on therendezvous peer to perform some task to make the system act moreefficiently.

[0461] In a network-of peers, some peers may elect themselves, throughthe discovery protocol, to become rendezvous peers. A rendezvous peermay act as a broker or discovery message router to route discoverymessages to the right place. In other words, a rendezvous may act toroute discovery requests to the right rendezvous peers. For example, arendezvous peer may receive a message requesting information about peersthat are interested in baseball. The rendezvous peer may know of anotherrendezvous peer that specializes in information about baseball. Thefirst rendezvous peer may forward or route the message to the secondrendezvous peer. In one embodiment, rendezvous peers may maintainconnections to other rendezvous peers in order to provide discovery androuting functionality.

[0462] Rendezvous peers may support long-range discovery. For example, afirst peer is at a remote location from a second peer. For one of thesepeers to find the other with a mechanism such as web crawling may betime consuming, since there maybe a lot of “hops” between the two peers.Rendezvous peers may provide a shortcut for one of the peers to discoverthe other. The rendezvous peer, thus, may serve to make the discoveryprocess, in particular long-range discover, more efficient.

[0463] A peer-to-peer network may be dynamic. Peers and peer groups cancome and go. Dynamic identifiers (addresses) may be used. Thus, routesbetween peers need to be dynamic. Rendezvous peers may provide a methodfor route discovery between peers that allows routing in thepeer-to-peer network to be dynamic. In this method, the rendezvous peersmay perform route discovery for peers when the peers send discoverymessages to the rendezvous peers or when a peer is attempting to connectto another peer or peer group that is not in the local region of thepeer. This method may be transparent to the requesting peer.

[0464] In one embodiment, the rendezvous peers may be able to cacheadvertisements. An advertisement may be defined as metadata ordescriptions of a resource. An advertisement may include informationnecessary for an entity to connect to or use the resource, for example aservice advertisement may include information for connecting to andusing the service. Advertisements may be published to allow otherentities to discover them. The rendezvous peer may provide the abilityfor services and applications to store and cache temporary, e.g. via alease mechanism, advertisements. This may used, for example, when oneservice needs to connect to another service, and needs the pipe endpointor communication channel that may be used to connect to the service. Thepipe endpoint may be included in a service advertisement published on arendezvous peer. Thus, in one embodiment, the rendezvous peer providesthe ability for peers, peer groups, services and applications toadvertise pipe endpoints and to discover pipe endpoints of services andapplications.

[0465] In one embodiment, the rendezvous protocol may use an index cache(e.g. on a peer serving as a rendezvous proxy). FIG. 13 illustratesdiscovery through a rendezvous peer according to one embodiment.Rendezvous proxy 206 may cache peer 200 and peer group 210 informationfor peer groups 210A and 210B. Peers 200 in each peer group 210 may thendiscover each other through rendezvous proxy 206. Rendezvous proxy 206may itself be a peer and may be a member in one or more peer groups 210.In one embodiment, access to rendezvous proxies 206 may be restricted topeers with rendezvous access privileges. In this embodiment, non-trustedpeers (peers without access privileges) may access rendezvous proxies206 through trusted peers 200 within their peer group 210, oralternatively through other local peers in other peer groups. In oneembodiment, the rendezvous protocol may be used across subnets(configurable at the peer group level). In one embodiment, therendezvous protocol may be used across/through firewalls (e.g.gateways).

[0466] In one embodiment, the peer-to-peer platform may include apropagate policy for use in discovery. FIG. 14 illustrates discoverythrough propagate proxies according to one embodiment. In oneembodiment, discovery proxy 208 may control propagation of discoverymessages. In FIG. 14, discovery proxy 208 may receive discovery messagesfrom peers 200 in peer group 210A and propagate the messages to peers inother groups such as peer group 210B. In one embodiment, access todiscovery proxies 208 may be restricted to peers with discovery proxyaccess privileges. In this embodiment, non-trusted peers (peers withoutaccess privileges) may access discovery proxies through trusted peers200 within their peer group 210, or alternatively through other localpeers in other peer groups. In one embodiment, propagation may becontrolled using TTL (time to live). In another embodiment, propagationmay be controlled using message counts. In one embodiment, the propagatepolicy may be used for subnet TCP/multicast (platform configurable). Inone embodiment, the propagate policy may support HTTP gateways (platformconfigurable). In one embodiment, the propagate policy may be usedthrough firewalls (e.g. need peer activation behind firewalls).

[0467] In one embodiment, the peer-to-peer platform may include aninvite policy. In one embodiment, the invite policy may support theadding of new peers and peer groups (e.g. publish advertisements).

[0468] In one embodiment, the peer-to-peer platform may allow thepersistent local peer caching of discovery information. In thisembodiment, a peer may be allowed to cache advertisements discovered viathe peer discovery protocol for later usage. Caching may not be requiredby the peer-to-peer platform, but caching may be a useful optimization.The caching of advertisements by a peer may help avoid performing a newdiscovery each time the peer is accessing a network resource. In ahighly transient environment, performing the discovery may be necessary.In a static environment, caching may be more efficient.

[0469] In one embodiment, the peer-to-peer platform may support trusteddiscovery peers. In one embodiment, the peer-to-peer platform may usediscovery credentials. In one embodiment, the peer-to-peer platform mayallow credential delegation. In one embodiment, the peer-to-peerplatform may support propagate proxies. In one embodiment, a propagateproxy may support TTL/message counts. TTL stands for Time To Live (howlong the request lives in the system). In one embodiment, a propagateproxy may support net crawling. In one embodiment, a propagate proxy mayprovide “smart above” routing.

[0470] In one embodiment, a peer may not initiate a new discoveryrequest until the minimum allowable interval between discoveries isreached. This limitation on the maximum rate of discoveries may besimilar to the mechanism required by Internet nodes to limit the rate atwhich ARP requests are sent for any single target IP address. Themaximum rate may be defined by each specific implementation transportbindings and exported to the application.

[0471]FIG. 15 illustrates using messages to discover advertisementsaccording to one embodiment. A message or messages may be used to getall known, reachable advertisements within a region on the network. Inone embodiment, this list may not be guaranteed to be exhaustive, andmay be empty. Named peers may also be located using the peer discoveryprotocol. A message may include a peer group credential of the probing(requesting) peer that may identify the probing peer to the messagerecipient. The destination address may be any peer within a region (apropagate message 230) or alternatively a rendezvous peer (a unicastmessage 232). The response message 234 may return one or moreadvertisements (e.g. peer advertisements and/or peer groupadvertisements) that may include “main” endpoint addresses which may beconverted to a string in the standard peer endpoint format (e.g. URI orURL) and also may include a network transport name.

[0472] In one embodiment, the peer discovery protocol may not guaranteepeers that receive a query will respond to the query, nor does itmandate that the number of advertisements requested will be honored. Inthis embodiment, a best effort is made at matching the query to resultsin the respondent's cache. In one embodiment, the peer discoveryprotocol does not guarantee that a response to a discovery query requestwill be made. In one embodiment, responding to a discovery query requestis optional. A peer may not be required to respond to a discovery queryrequest.

[0473] In one embodiment, the peer discovery protocol does not require areliable transport. Multiple discovery query requests may be sent. None,one, multiple pr redundant responses may be received. In one embodiment,the peer discovery protocol may utilize the resolver protocol to routequeries and responses. The tasks of propagating and re-propagating aquery to the next set of peers may be delegated to the resolver service.

[0474] In one embodiment, a peer may receive a discovery response thatis not a response to any discovery query initiated by the peer. Thismechanism may provide the ability to remote publish a resource. In oneembodiment, he peer discovery protocol may provides a mechanism forservices to query the network for peer-to-peer resources and receiveresponses. In one embodiment, the peer discovery protocol may be used totake care of some or all messaging aspects, caching, and expiringadvertisements.

[0475] In one embodiment, a discovery query message may be used to senda discovery request to find advertisements (e.g. for peers or peergroups). The discovery query may be sent as a query string (attribute,value) form. A null query string may be sent to match any results. Athreshold value may be included to indicate the maximum number ofmatches requested by a peer. The following is an example of oneembodiment of a discovery query message in XML, and is not intended tobe limiting: <DiscoveryQuery>  <Credential> Credential </Credential> <QueryID> query id</QueryID>  <Type> request type (e.g. PEER, PEERGROUP, PIPE, SERVICE,  CONTENT)  </Type>  <Threshold> requested numberof responses </Threshold>  <PeerAdv> peer advertisement of requestor</PeerAdv>  <Attribute> attribute </ Attribute>  <Value> value </Value></DiscoveryQuery>

[0476] Embodiments of a discovery query message may include one or moreof, but are not limited to, the following fields:

[0477] Credential: The credential of the sender.

[0478] QueryID: Query identifier.

[0479] Type: specifies which advertisements are returned.

[0480] Threshold: specifies the maximum number of advertisements thateach responding peer should provide. The total number of resultsreceived may depend on the number of peers that respond and theadvertisements they have. In one embodiment, if <Type> indicates peeradvertisements and <Threshold> is a particular value (e.g. 0) then thequery is to collect peer advertisements of respondents. Therefore, anypeer should respond to such a query, even though no results are to beincluded.

[0481] PeerAdv: if present, peer advertisement of the requestor.

[0482] Attribute: specifies the query attribute.

[0483] Value: specifies the query value.

[0484] In one embodiment, the value is only present if the attribute ispresent. Both the attribute and value may be omitted. In one embodiment,both attribute and value must either both be present or absent. In oneembodiment, if attribute and value are absent, then each respondent maysupply a random set of advertisements of the appropriate type up to<Threshold> count.

[0485] In one embodiment, only advertisements including an element witha name matching <Attribute> and that also includes a value matching<Value> are eligible to be found. In one embodiment, <Value> may beginand/or end with an indicator such as a special character (e.g. “*”).This indicates that <Value> will match all values that end with orbeginning with, or contain the rest of the string. If <Value> includesonly the indicator (e.g. “*”), the result may be unspecified. Someimplementations may choose not match any advertisement for a <Value>including only the indicator.

[0486] In one embodiment, a discovery response message may be used tosend a discovery response message to answer a discovery query message.The following is an example of one embodiment of a discovery responsemessage in XML, and is not intended to be limiting: <DiscoveryResponse> <Credential> Credential </Credential>  <QueryId> query id</QueryId> <Type> request type (e.g. PEER, GROUP, PIPE, SERVICE,  CONTENT) </Type> <PeerAdv> peer advertisement of the respondent </PeerAdv>  <Attribute>Attribute </Attribute>  <Value> value </Value>  <Count> count </Count> <Responses>   (peer, peer group, pipe, service or content advertisementresponse)  </Responses>  <............>  <Responses>   (peer, peergroup, pipe, service or content advertisement response)  </Responses></DiscoveryResponse>

[0487] Embodiments of a discovery response message may include one ormore of, but are not limited to, the following fields:

[0488] Credential: The credential of the sender.

[0489] QueryID: Query identifier.

[0490] Type: The type of the advertisements returned in the <Response>element(s).

[0491] Count: If present, the number of <Response>element(s) included inthis response message.

[0492] PeerAdv: If present, the advertisement of the respondent. Mayinclude an expiration attribute that indicates the associated relativeexpiration time in milliseconds.

[0493] Attribute: specifies the query attribute.

[0494] Value: specifies the query value.

[0495] Responses: advertisement responses. The advertisements may be,for example, peer, peer group, pipe, content or software module (e.g.service) advertisements. In one embodiment, each may include anExpiration attribute that indicates an associated relative expirationtime in milliseconds.

[0496] In one embodiment, the value tag is only present if the Attributetag field is present. Both the Attribute and Value tag may be omitted.

[0497] In one embodiment, if an advertisement document (e.g. an XMLdocument) is embedded into another document (e.g. XML document), thedocument separators must be dealt with. For XML documents, his may bedone using the standard XML escaping rules. For example, ‘<’ becomes‘&lt;’ ‘>’becomes ‘&gt;’ and ‘&’ becomes ‘&amp’.

[0498] Reverse Discovery

[0499] Reverse discovery means that, in a peer-to-peer network, when afirst entity (e.g. a peer) discovers a second entity (e.g. anotherpeer), the second entity may also discover the first entity from thediscovery initiated by the first entity. This may also be referred to as“mutual discovery”. In most traditional systems, discovery is typicallyone-directional. In the peer-to-peer world, reverse discovery isimportant because, by definition, all “peers” are equal (i.e. it istypically not a hierarchical system). In one embodiment, there may bedifferent levels of discovery for peers. For example, a peer may beconfigured to remain anonymous when discovering other peers or to alwayssupport reverse discovery. In one embodiment, a peer initiating adiscovery may also be configured to deny discovery to another peer ifthe other peer is configured or chooses to remain anonymous. In oneembodiment, a peer may also be configured to or may choose to denydiscovery by other peers that wish to remain anonymous.

[0500] Invitations

[0501] One embodiment of the discovery protocol may also provide methodsby which a peer can “advertise” itself, for example when joining apeer-to-peer network. For example, a peer may send an email message, bytelephone, by “traditional” mail, or by other methods to other peers itdiscovers or is preconfigured to know about to advertise its presenceand willingness to be contacted by other peers. This is done outside ofthe discovery method, and may be performed by any external medium. Apeer who receives an invitation from a peer may have a capability to addor enter the new peer to a list or database of peers that it knowsabout. When the peer later restarts, these peers may be among thepreconfigured peers that the peer knows about. In one embodiment, a peermay have a “notify” or “invitation” interface to allow a user toinitiate invitations. In one embodiment, the peer-to-peer platform mayprovide import and export capabilities for invitations. In oneembodiment, the invitations may be implemented as documents external tothe peer-to-peer system that may be exported from one peer and importedinto another peer. In one embodiment, the invitations may be in a formatthat enables the exporting and importing. In one embodiment, theinvitations may be in XML format. In one embodiment, an interface may beprovided to allow the manual entering of invitation information.Importing the invitation may create a peer-to-peer platform documentthat may then be used by the peer. The format of exported documents maydepend on the platform on which the peer is implemented.

[0502] Rendezvous Protocol

[0503] One embodiment may include a rendezvous protocol that may beresponsible for propagating messages within a peer group. Whiledifferent peer groups may have different means to propagate messages,the rendezvous protocol defines a protocol that enables peers to connectto services (propagate messages to other peers and receive propagatedmessages from other peers) and to control the propagation of messages(TTL, loopback detection, etc.).

[0504] One embodiment may include a rendezvous advertisement that may beused to describe a peer that acts as a rendezvous peer for a given peergroup. Rendezvous advertisements may be published and retrieved, so thatpeers that are looking for rendezvous peers can find them. In oneembodiment, a rendezvous advertisement may include a name element thatmay be associated with the rendezvous peer. This may be the peer name.In one embodiment, the name element is optional. In one embodiment, arendezvous advertisement may include a rendezvous group identifierelement that includes the peer-to-peer platform identifier of the peergroup for which the peer is a rendezvous. In one embodiment, thiselement is required. In one embodiment, a rendezvous advertisement mayinclude a rendezvous peer identifier element that may include thepeer-to-peer platform identifier of the rendezvous peer. In oneembodiment, this element is required.

[0505] Rendezvous peers may be used to re-propagate messages they havereceived. A peer may dynamically become a rendezvous peer and/or maydynamically connect to a rendezvous peer. In one embodiment, theconnection between a peer and a rendezvous peer may be achieved by anexplicit connection, associated to a lease. In one embodiment, thisconnection may be performed by sending messages using the endpointprotocol. Each rendezvous protocol may be listening on an endpointaddress with a service name and service parameter (e.g. peer groupidentifier).

[0506] In one embodiment, one or more queries and responses may bedefined by the rendezvous protocol in order to establish connections. Alease request may be sent by a peer that desires to connect to a givenrendezvous. In one embodiment, the lease request may not include anindication of the amount of the lease; the rendezvous will give whateveramount it determines is appropriate. In one embodiment, a rendezvousthat grants a lease may return a lease granted message. This message issent by a rendezvous that is granted a lease to a given client. Theamount of time the lease is granted may be included in the message. Inone embodiment, a lease may be canceled by either party at any time ifnecessary or desired. A lease cancel request may be sent by a client toa rendezvous in order to cancel an existing lease. The rendezvous mayreply with a lease cancelled message.

[0507] In one embodiment, the peer resolver protocol resides on top ofthe rendezvous protocol. In this embodiment, the peer resolver protocolis not used to send these messages. In one embodiment, the rendezvousprotocol may reside on top of the endpoint routing protocol, which maybe used to send rendezvous protocol messages.

[0508] In one embodiment, the rendezvous protocol is responsible forcontrolling the propagation of messages. In one embodiment, therendezvous protocol may propagate a message unless of the followingconditions is detected:

[0509] Loop: if a propagated message has already been processed on apeer, it is discarded.

[0510] TTL: propagated messages are associated with a Time To Live(TTL). Each time a propagated message is received on a peer, its TTL isdecreased by one. When the TTL of a message drops to zero, the messageis discarded.

[0511] Duplicate: each propagated message is associated with a uniqueidentifier. When a propagated message has been duplicated, and hasalready been received on a peer, duplicates are discarded.

[0512] In one embodiment, propagation control may be performed byembedding a message element within each propagated message that mayinclude one or more of, but is not limited to, the following elements: amessage identifier, a destination name, a destination parameter, a TTL,and a path.

[0513] In one embodiment, when a peer wants to connect to a RendezvousPeer, it sends a lease request message with a connect message elementwhich includes its peer advertisement. When a rendezvous peer grants alease, it sends a lease granted message to the source of the leaserequest. In one embodiment, a lease granted message may include one ormore of, but is not limited to, the following elements:

[0514] A connected lease element that includes (e.g. in a Stringrepresentation) the time in milliseconds the lease is granted for. Inone embodiment, this is a required element.

[0515] A connected peer element that includes the peer identifier of therendezvous peer that has granted the lease. In one embodiment, this is arequired element.

[0516] A rendezvous advertisement reply element that includes the peeradvertisement of the rendezvous peer that grants the lease. In oneembodiment, this is an optional element.

[0517] In one embodiment, when a peer desires to cancel a lease, itsends a lease cancel request with a disconnect message element thatincludes the peer advertisement of the peer which is requesting tocancel the lease.

[0518] Peer Resolver Protocol

[0519] In one embodiment, the peer resolver protocol may be used todisseminate generic queries to one or multiple handlers within a peergroup and identify matching responses. Each query may be addressed to aspecific handler name. In one embodiment, this handler name may definethe particular semantics of the query and its responses, but is notassociated with any specific peer. A given query may be received by anynumber of peers in the peer group, possibly all, and processed accordingto the handler name if such a handler name is defined on that peer. Inone embodiment, the peer resolver protocol may provide a genericquery/response infrastructure for building high-level resolver services.In many situations, a higher-level service may have a better knowledgeof the group topology. In one embodiment, the peer resolver protocol mayuse a rendezvous service to disseminate a query to multiple peers orunicast messages to send queries to specified peers.

[0520] In one embodiment, the peer resolver protocol may allow a peer tosend simple, generic search queries to one or more peer services. In oneembodiment, only those peers that have access to data repositories andthat offer advanced search capabilities typically implement thisprotocol. Each service may register a handler in the peer group resolverservice to process resolver query requests. Resolver queries may bedemultiplexed to each service. Each service may respond to a peer via aresolver response message. It is important to point the differencesbetween the peer discovery protocol and the peer resolver protocol. Thepeer discovery protocol is used to search for advertisements tobootstrap a peer, and discover new network resources. The peer resolverprotocol is a generic service that services query protocols. The peerresolver protocol may be used by a service on a peer to interact with aservice on another peer.

[0521] The peer resolver protocol may enable each peer to send andreceive generic queries to find or search for peer, peer group, pipe orservice specific information such as the state of a service or the stateof a pipe endpoint. In one embodiment, each resolver query may have aunique service handler name to specify the receiving service, and aquery string to be resolved by the service. In one embodiment, the peerresolver protocol may provide a generic mechanism for peers to sendqueries and receive responses. In one embodiment, the peer resolverprotocol may remove the burden for registered message handlers by eachservice and set message tags to ensure uniqueness of tags. In oneembodiment, the peer resolver protocol may be used to take care of someor all messaging aspects, caching queries and responses and forwardingqueries, based on the invoker's decision. In one embodiment, the peerresolver protocol may ensure that messages are sent to correct addressesand peer groups. In one embodiment, the peer resolver protocol mayperform authentication and verification of credentials and the droppingof rogue or incorrect messages.

[0522]FIG. 16 illustrates one embodiment of using peer resolver protocolmessages between a requesting peer 200A and a responding peer 200B. Aresolver query message 236 may be used to send a resolver query to anamed handler on one or more peers 200 that are members of the peergroup. In one embodiment, a resolver query message 236 may be used tosend (unicast) a resolver query request to a service on another member200B of a peer group. In one embodiment, the resolver query may be sentas a query string to a specific service handler. In one embodiment, eachquery has a unique identifier. The query string may be any string thatmay be interpreted by the targeted service handler. A resolver responsemessage 238 may be sent (unicast) to the requesting peer 200A by theservice handler. The following is an example of one embodiment of aresolver query message in XML, and is not intended to be limiting:<ResolverQuery>  <Credential> Credential </Credential>  <HandlerName>name of handler </HandlerName>  <SrcPeerID> source peer identifier</SrcPeerID>  <QueryID> incremental query identifier </QueryID>  <Query>query string </Query> </ResolverQuery>

[0523] Embodiments of a resolver query message may include, but are notlimited to, the following fields:

[0524] Credential: The credential of the sender

[0525] HandlerName: service the query needs to be passed

[0526] SrcPeerID: The identifier of the peer originating the query (e.g.a URN)

[0527] QueryId: Query identifier

[0528] Query: query string

[0529] A resolver response message may be returned in response to aresolver query message. The following is an example of one embodiment ofa resolver response message in XML, and is not intended to be limiting:<ResolverResponse>  <Credential> Credential </Credential>  <HandlerName>name of handler </HandlerName>  <QueryID> query identifier </QueryID> <Response> response </Response> </ResolverResponse>

[0530] Embodiments of a resolver response message may include, but arenot limited to, the following fields:

[0531] Credential: The credential of the respondent

[0532] QueryID: Query identifier of the query to which this is aresponse

[0533] HandlerName: Specifies how to handle the response; e.g. servicethe query needs to be passed to

[0534] Response: response string including the response(s)

[0535] In one embodiment, the peer resolver protocol communicates byexchanging endpoint messages. Endpoint addresses specify a handler name.The peer resolver protocol attaches a listener by that name to theendpoint service.

[0536] In one embodiment, peer resolver protocol implementations may usethe same scheme for building their handler names. The convention used byall services of the world peer group may use the concatenation of theservice name, the peer group identifier, and a value unique within theservice.

[0537] The handler name in peer resolver protocol messages may perform arole similar to that of the handler name in endpoint message addresses:it is a demultiplexing key that specifies how, by which higher-levelprotocol, or by which module, the message is to be processed. In oneembodiment, the users of the peer resolver protocol are typicallyservices. Each instance of a given service (one per peer per group thatuses this service) generates a handler name that is unique on its peer,but will be identical for the instances of this service on other peers.In one embodiment, this may be achieved by concatenating the servicename (which is unique in the group), the group identifier, which isunique in the peer, and an additional parameter that serves todiscriminate between several handlers used by the same service, ifneeded.

[0538] The handler name may be used both to register the appropriatehandler for incoming queries or responses, and as a destination foroutgoing queries or responses. In one embodiment, clients of theresolver may define two names: one for propagated messages (e.g.queries), and one for unicast messages (e.g. responses).

[0539] In one embodiment, the peer resolver protocol may not allow theregistration of more than one handler with the same name. A service mayregister for any handler name that it uses as a destination, therebypreventing other services from registering themselves to receive thesemessages. In one embodiment, a service or application that receivesqueries or responses from a service instance on another peer is de-factothe local instance of that service and may handle these messages asspecified.

[0540] In one embodiment, the peer resolver protocol may not guaranteepeers that define a query handler name will receive that query ormandate that all peers that define this handler name will receive it. Inthis embodiment, the peer resolver protocol may be used to disseminatethe query in a way that maximizes the chance of obtaining a response, ifone can be obtained. In one embodiment, response to a resolver queryrequest is optional; a peer is not required to respond. In thisembodiment, it may not be guaranteed that a response to a resolver queryrequest will be made.

[0541] In one embodiment, a reliable transport may not be required bythe peer resolver protocol, and the peer resolver protocol may notassume the presence of reliable message delivery. In one embodiment,multiple resolver query messages may be sent. None, one, multiple orredundant responses may be received.

[0542] In one embodiment, the task of propagating a query to the nextset of peers may be handled by the rendezvous protocol. In oneembodiment, a rendezvous service may be responsible for determining theset of peers that should receive a message being propagated, but may notautomatically re-propagate an incoming propagated message. In thisembodiment, the service (query handler) handling the message maydetermine if further propagation is to be performed. In one embodiment,the peer resolver protocol may use the following policy: if the queryhandler does not instruct the peer resolver protocol to discard thequery, and if the local peer is a rendezvous, then the query isre-propagated (within the limits of loop and TTL rules enforced by therendezvous service). In addition, if instructed by the query handler, anidentical query may be issued with the local peer as the originator.

[0543] Peer Information Protocol

[0544] Once a peer is located, its capabilities and status may be ofinterest. In one embodiment, the peer-to-peer platform may include apeer information protocol that may allow a peer to learn about otherpeers' capabilities and status. For example, a peer can send a pingmessage to see if another peer is alive. A peer may also query anotherpeer's properties where each property has a name and a value string. Inone embodiment, a peer may not be required to respond to a peerinformation protocol request.

[0545]FIG. 17 illustrates one embodiment of using peer informationprotocol messages between a requesting peer 200A and a responding peer200B. In one embodiment, to see if peer 200B is alive (i.e. respondingto messages), peer 200A may be sent a ping message 240. The ping message240 may include a destination address that is peer 200B's “main”endpoint returned during discovery, for example. The message may alsoinclude a group membership credential of the requesting peer 200A thatmay identify the probing peer 200A to the message recipient 200B. Themessage may also contain an identifier unique to the sender. In oneembodiment, this identifier may be returned in the response message 242.Response message 242 may include information about peer 200B, includinginformation on the status of the peer 200B. If peer 200B responds with amessage 242, this may indicate to peer 200A that peer 200B is “alive”and thus currently responding to messages.

[0546] In one embodiment, messages may be used to get a list of namedcontrol “properties” exported by a peer. A property is a “knob” used toget information or configuration parameters from the peer. In oneembodiment, all properties may be named (e.g., by a string), and may be“read-only.” In one embodiment, higher-level services may offer“read-write” capability to the same information, given proper securitycredentials. In one embodiment, each property may have a name and avalue string. Read-write widgets may allow the string value to bechanged, while read-only widgets do not. In one embodiment, the peerinformation protocol only gives read access. The destination address isa peer's main endpoint that may have been returned in a discoveryresponse message.

[0547] Once a peer is located, its capabilities and status may bequeried. The peer information protocol provides a set of messages toobtain a peer status information. In one embodiment, the peerinformation protocol is an optional peer-to-peer platform protocol. Inone embodiment, peers are not required to respond to peer informationprotocol requests.

[0548] In one embodiment, the peer information protocol may be layeredupon the peerr resolver protocol. In one embodiment, a <QueryID> messageelement may be used to match peer information protocol queriescontaining <request> elements to the peer information protocol responsemessages containing the matching responses.

[0549] In one embodiment, the peer information protocol query messagemay include a request field that may be used to encode a specificrequest. In one embodiment, the peer information protocol does notdictate the format of the request field and it is left up to theconsumer to do so. Higher-level services may utilize the request fieldto offer expanded capabilities.

[0550] In one embodiment, a reliable transport is not required by thepeer information protocol. In one embodiment, multiple peer informationmessages may be sent. None, one or multiple responses may be received.

[0551] In one embodiment, a peer information protocol query message maybe sent to a peer to query the current state of the peer, and tooptionally obtain other relevant information about the peer. In oneembodiment, a peer information protocol query message without a definedrequest field may expect in return a default set of information about apeer (i.e. uptime, message count, etc.). In one embodiment, a peerinformation protocol query message may include a source peer identifiermessage element that indicates the peer identifier of the requestingpeer. In one embodiment, a peer information protocol query message mayinclude a target peer identifier message element that indicates the peeridentifier of the peer being queried. In one embodiment, a peerinformation protocol query message may include a request element. In oneembodiment, the request element may be optional.

[0552] In one embodiment, a peer information protocol response messagemay include specific information about the current state of a peer, suchas uptime, inbound and outbound message count, time last messagereceived, and time last message sent. In one embodiment, a peerinformation protocol response message may include a source peeridentifier message element that indicates the peer identifier of therequesting peer. In one embodiment, a peer information protocol responsemessage may include a target peer identifier message element thatindicates the peer identifier of the peer being queried. In oneembodiment, a peer information protocol response message may include anuptime element that may indicate the relative time (e.g. inmilliseconds) since the responding peer information service beganexecution. In one embodiment, peers may include this element in all peerinformation protocol responses. In one embodiment, peers may choose tonot include this element if the information is unavailable or wouldrepresent a security breach. In one embodiment, a peer informationprotocol response message may include a timestamp element that indicatesthe absolute time at which this response was generated. In oneembodiment, peers may include this element in all peer informationprotocol responses. In one embodiment, peers may choose to not includethis element if the information is unavailable or would represent asecurity breach. In one embodiment, a peer information protocol responsemessage may include a response element that may include a response to aprevious request from a peer information protocol query message. In oneembodiment, to match queries to responses, a query identifier element ofthe peer resolver Protocol must match. This field may include anydesired content. In one embodiment, a peer information protocol responsemessage may include a traffic element that may include information aboutthe network traffic performed by the target peer. In one embodiment,this element is optional.

[0553] In one embodiment, a ping message may be sent to a peer to checkif the peer is alive and/or to get information about the peer. The pingoption may define the response type returned. In one embodiment, a fullresponse (peer advertisement) or a simple acknowledge response (aliveand uptime) may be returned. The following is an example of oneembodiment of a ping message in XML, and is not intended to be limiting:<Ping>  <Credential> Credential </Credential>  <SourcePid> Source Peeridentifier </SourcePid>  <TargetPid> Target Peer identifier </TargetPid> <Option> type of ping requested</Option> </Ping>

[0554] In one embodiment, a peer information response message may beused to send a response message in response to a ping message. Thefollowing is an example of one embodiment of a peer information responsemessage in XML, and is not intended to be limiting: <PeerInfo> <Credential> Credential </Credential>  <SourcePid> Source Peeridentifier </SourcePid>  <TargetPid> Target Peer identifier </TargetPid> <Uptime> uptime</Uptime>  <TimeStamp> timestamp </TimeStamp>  <PeerAdv>Peer Advertisement </PeerAdv> </PeerInfo>

[0555] Peer Membership Protocol

[0556] In one embodiment, the peer-to-peer platform may include a peermembership protocol that may allow a peer to join or leave peer groups,and to manage membership configurations, rights and responsibilities.This protocol may allow a peer to obtain group membership requirements(such as an understanding of the necessary credential for a successfulapplication to join the group), to apply for membership and receive amembership credential along with a full group advertisement, to updatean existing membership or application credential, and to cancel amembership or an application credential. In one embodiment,authenticators and/or security credentials may be used to provide thedesired level of protection.

[0557] In one embodiment, the process of joining a peer group mayinclude obtaining a credential that is used to become a group member. Inone embodiment, the process of joining a peer group may includeobtaining a “form” listing the set of requirements asked of all groupmembers. In one embodiment, this form may be a structured document (e.g.a peer group advertisement) that lists the peer group membershipservice.

[0558] In one embodiment, the peer membership protocol may definemessages including, but not limited to, an apply message, a joinmessage, an acknowledgement (ACK) message, a renew message, and a cancelmessage. A peer membership protocol apply message may be sent by apotential new group member to the group membership applicationauthenticator. In one embodiment, the authenticator's endpoint may belisted in the peer group advertisement of every member. In oneembodiment, a successful response from the group's authenticator mayinclude an application credential and a group advertisement that maylist, at a minimum, the group's membership service. In one embodiment,the apply message may include, but is not limited to, the currentcredential of the candidate group member and the peer endpoint for thepeer group membership authenticator to respond to with anacknowledgement (ACK) message.

[0559] The following is an example of one embodiment of a peermembership protocol apply message in XML, and is not intended to belimiting: <MembershipApply> <Credential> Credential of requestor</Credential> <SourcePid> Source pipe identifier </SourcePid><Authenticator> Authenticator pipe advertisement </Authenticator></MembershipApply>

[0560] A peer membership protocol join message may be sent by a peer tothe peer group membership authenticator to join a group. In oneembodiment, the peer may pass an application credential (from an applyresponse ACK message) for authentication purposes. In one embodiment, asuccessful response from the group's authenticator may include a fullmembership credential and a full group advertisement that lists, at aminimum, the group's membership configurations requested of full membersin good standing. The message may include a credential (applicationcredential of the applying peer: see ACK message). This credential maybe used as the application form when joining. The message may alsoinclude the peer endpoint for the authenticator to respond to with anACK message.

[0561] The following is an example of one embodiment of a peermembership protocol join message in XML, and is not intended to belimiting: <MembershipJoin> <Credential> Credential of requestor</Credential> <SourcePid> Source pipe identifier </SourcePid><Membersship> membership pipe advertisement </Membership> <Identity>identity</Identity> </MembershipJoin>

[0562] A peer membership protocol ACK message is an acknowledge messagethat may be used for both join and apply operations. A peer membershipprotocol ACK message may be sent back by the membership authenticator toindicate whether or nor the peer was granted application rights to thepeer group if the peer is applying, or full membership to the peer groupif peer is attempting to join. In one embodiment, an ACK message mayalso be sent in response to peer membership protocol renew messages andcancel messages. The message may include a credential (an application ormembership credential allocated to the peer by the peer groupauthenticator). The message may also include a more complete peer groupadvertisement that may provide access to further configurations. In oneembodiment, not all configuration protocols are visible until the peerhas been granted membership or application rights. Some configurationsmay need to be protected. Also, depending on the peer credential, thepeer may not have access to all the configurations.

[0563] The following is an example of one embodiment of a peermembership protocol ack message in XML, and is not intended to belimiting: <MembershipAck> <Credential> Credential </Credential><SourcePid> Source pipe identifier </SourcePid> <Membersship> membershippipe advertisement </Membership> <Peer groupAdv> peer groupadvertisement </Peer groupAdv> <Peer groupCredential> credential granted</Peer groupCredential> </MembershipAck>

[0564] A peer membership protocol renew message may be sent by a peer torenew its credential (membership or application) access to the peergroup. An ACK (acknowledgement) message may be returned with a newcredential and lease if the new is accepted. The renew message mayinclude, but is not limited to, a credential (a membership orapplication credential of the peer) and the peer endpoint to which anACK response message may be sent.

[0565] The following is an example of one embodiment of a peermembership protocol renew message in XML, and is not intended to belimiting: <MembershipRenew> <Credential> Credential </Credential><SourcePid> Source pipe identifier </SourcePid> <Membersship> membershippipe advertisement </Membership> </MembershipRenew>

[0566] A peer membership protocol cancel message may be sent by a peerto cancel the peer's membership or application rights in a peer group.The message may include, but is not limited to, a credential (amembership or application credential of the peer) and the peer endpointto send an ACK message. In one embodiment, an ACK to a cancel mayinclude a response status indicating the cancel was accepted.

[0567] The following is an example of one embodiment of a peermembership protocol cancel message in XML, and is not intended to belimiting: <MembershipCancel> <Credential> Credential </Credential><SourcePid> Source pipe identifier </SourcePid> <Membersship> membershippipe advertisement </Membership> </MembershipCancel>

[0568] Pipe Binding Protocol

[0569] In one embodiment, the peer-to-peer platform may include a pipebinding protocol that may allow a peer to find the physical location ofa pipe endpoint and to bind a pipe advertisement to the pipe endpoint,thus indicating where messages actually go over the pipe. A pipe isconceptually a virtual channel between two pipe endpoints (input andoutput pipes) and may serve as a virtual link between two or more peersoftware components (e.g. services or applications).

[0570] A pipe may be viewed as an abstract, named message queue thatsupports a number of abstract operations such as create, open, close,delete, send, and receive. The pipe virtual link (pathway) may belayered upon any number of physical network transport links such asTCP/IP, HTTP, and TLS. In one embodiment, the pipe binding protocol islayered upon the endpoint protocol that allows it to use a variety oftransport protocols, such as HTTP Transport, TCP/IP Transport, or asecure TLS Transport. Each end of the pipe may work to maintain thevirtual link and to reestablish it, if necessary, by binding endpointsor finding the pipe's currently bound endpoints.

[0571] Actual pipe implementations may differ, but in one embodiment,peer-to-peer platform-compliant implementations may use the pipe bindingprotocol to bind pipes to pipe endpoints. In one embodiment, during theabstract create operation, a local peer binds a pipe endpoint to a pipetransport. In another embodiment, bind may occur during the openoperation. Unbind occurs during the close operation. In one embodiment,each peer that “opens” a group pipe may make an endpoint available(binds) to the pipe's transport. In one embodiment, messages may be sentonly to the one or more endpoints bound to the pipe. Peers that have notopened the pipe may not receive or send any messages on that pipe. Inone embodiment, when some peer software wants to accept incoming pipemessages, the receive operation may remove a single message in the orderit was received, not in the order it was sent. In one embodiment, a peekoperation may be used as a mechanism to see if any message(s) hasarrived in the pipe's queue.

[0572] In one embodiment, the pipe binding protocol may define messagesincluding, but not limited to, a query message and a response message.In one embodiment, a pipe binding protocol query message may be sent bya peer pipe endpoint to find a pipe endpoint bound to the same pipeadvertisement. The following is an example of one embodiment of a pipebinding protocol query message in XML, and is not intended to belimiting: <PipeBindingQuery> <Credential> query credential </Credential><Peer> optional tag. If present, it may include the peer identifier ofthe only peer that should answer the request. </Peer> <Cached> true ifthe reply can come from a cache </Cached> <Pipeld> pipe identifier to beresolved </Pipeld> </PipeBindingQuery>

[0573] In one embodiment, the requestor may ask that the information notbe obtained from a cache. This is to obtain the most up-to-dateinformation from a peer to address stale connection. The Peer fieldspecifies a peer identifier. This peer is the one that should respond tothe query. In one embodiment, there may be no guarantee that a responseto a pipe binding request will be made. In one embodiment, a peer is notrequired to respond to a binding request. In one embodiment, a reliabletransport is not required. In one embodiment, multiple binding querymessages may be sent. None, one or multiple responses may be received.

[0574] In one embodiment, a pipe binding protocol response message maybe sent to the requesting peer by each peer bound to the pipe inresponse to a query message. The following is an example of oneembodiment of a pipe binding protocol response message in XML, and isnot intended to be limiting: <PipeBindingAnswer> <Credential> credential</Credential> <Pipeld> pipe identifier resolved </Pipeld> <Peer> peerURI where a corresponding lnputPipe has been created </Peer> <Found>true: the InputPipe does exist on the specified peer (ACK) false: theInputPipe does not exist on the specified peer (NACK) </Found></PipeBindingAnswer>

[0575] Endpoint Routing Protocol

[0576] In one embodiment, the peer-to-peer platform may include anendpoint routing protocol. The endpoint routing protocol may be used bypeers to send messages to router peers requesting available routes forsending message(s) to destination peers. In one embodiment, this may beaccomplished through message exchanges between peer routers. Peerrouting may be necessary to enable two peers to communicate depending ontheir location in the network. For instance, the two peers may be ondifferent transports; the peers may be separated by a firewall; or thepeers may be using incompatible private IP address spaces. Whennecessary, one or more peer routers may be used to deliver a messagefrom the originating peer endpoint to the destination peer endpoint.

[0577] A peer-to-peer platform network is typically an ad hoc,multi-hops, and adaptive network by nature. Connections in the networkmay be transient, and message routing may be nondeterministic. Routesmay be unidirectional and change rapidly. Peers may appear and leavefrequently. Two communicating peers may not be directly connected toeach other. Two communicating peers may need to use router peers toroute messages depending on the network topology. For example, the twopeers may be on different network transports, or the peers may beseparated by a firewall or a NAT (Network Address Translation) router. Apeer behind a firewall may send a message directly to a peer outside afirewall. But a peer outside the firewall cannot establish a connectiondirectly with a peer behind the firewall.

[0578] The endpoint routing protocol may define a set of request/querymessages that is processed by a routing service to help a peer routemessages to its destination. When a peer is asked to send a message to agiven peer endpoint address, it may look in its local cache to determineif it has a cached route to this peer. If the peer does not find aroute, it may send a route resolver query message to available peerrouters requesting route information. A peer may have access to as manypeer routers as it can find, or optionally a peer may be pre-configuredto access certain routers.

[0579] Peer routers may provide the low-level infrastructures to route amessage between two peers in the network. Any number of peers in a peergroup may elect themselves to become peer routers for other peers. Peersrouters offer the ability to cache route information, as well asbridging different physical (different transport) or logical (firewalland NAT) networks. A peer may dynamically find a router peer via aqualified discovery search. A peer may find out if a peer it hasdiscovered is a peer router via the peer advertisement, for example by aproperties tag and/or by a parameters element.

[0580] When a peer router receives a route query, if it knows thedestination (a route to the destination), it may answer the query byreturning the route information as an enumeration of hops. The messagemay be sent to the first router and that router may use the routeinformation to route the message to the destination peer. The route maybe ordered from the next hop to the final destination peer. At anypoint, the routing information may become obsolete, requiring thecurrent router to find a new route in order to complete the messagedelivery.

[0581] The peer endpoint may add extra routing information to themessages sent by a peer. When a message goes through a peer, theendpoint of that peer may leave its trace on the message. The trace maybe used for loop detection and to discard recurrent messages. The tracemay also be used to record new route information by peer routers.

[0582] In one embodiment, the endpoint routing protocol may provide lastresort routing for a peer. More intelligent routing may be implementedby more sophisticated routing services in place of the core routingservice. High-level routing services may manage and optimize routes moreefficiently than the core service. In one embodiment, the hooksnecessary for user defined routing services to manipulate and update theroute table information (route advertisements) used by the peer routermay be provided by the endpoint routing protocol. Thus, in oneembodiment, the complex route analysis and discovery may be performedabove the core by high-level routing services, and those routingservices may provide intelligent hints to the peer router to routemessages.

[0583] Router peers may cache route information. Router peers mayrespond to queries with available route information. Route informationmay include a list of gateways along the route. In one embodiment, anypeer may become a router peer by implementing the endpoint routingprotocol. The following is an example of one embodiment of routeinformation in XML, and is not intended to be limiting: <endpointrouter > <Credential> credential </Credential> <Src> peer identifier ofthe source </Src> <Dest> peer identifier of the destination </Dest><TTL> time to live </TTL> <Gateway> ordered sequence of gateway</Gateway> ................... <Gateway> ordered sequence of gateway</Gateway> </endpoint router >

[0584] The time-to-live parameter specifies how long this route isvalid. In one embodiment, the time-to-live indicator may be measured inhops. The creator of the route can decide how long this route will bevalid. The gateways may be defined as an ordered sequence of peeridentifiers that define the route from the source peer to thedestination peer. The sequence may not be complete, but in oneembodiment, at least the first gateway is present. The first gateway issufficient to initially route the messages. In one embodiment, theremaining gateway sequence may be optional.

[0585] The endpoint routing protocol may provide messages including, butnot limited to, a route request message and a route answer message fromthe router peer. In one embodiment, a peer may send a route requestmessage to a router peer to request route information. Route informationmay be cached or not cached. In some cases, the route query requestmessage may indicate to bypass the cache content and thus to searchdynamically for a route. In one embodiment, it may not be guaranteedthat a route response will be received after a query is sent. Thefollowing is an example of one embodiment of a route query requestmessage in XML, and is not intended to be limiting: <endpoint routerquery> <Credential> credential </Credential> <Dest> peer identifier ofthe destination </Dest> <Cached> true: if the reply can be a cachedreply   false: if the reply must not come from a cache </Cached></endpoint router query>

[0586] In one embodiment, a router peer may send a route answer messageto a peer in response to a route information request. The following isan example of one embodiment of a route answer message in XML, and isnot intended to be limiting: <endpoint router answer> <Credential>credential </Credential> <Dest> peer identifier of the destination</Dest> <RoutingPeer> Peer identifier of the router that knows a routeto DestPeer </RoutingPeer> <RoutingPeerAdv> Advertisement of the routingpeer </RoutingPeerAdv> <Gateway> ordered sequence of gateways </Gateway>................... <Gateway> ordered sequence of gateways </Gateway></endpoint router answer>

[0587] In one embodiment, the gateway(s) may be represented bypeer-to-peer platform identifiers.

[0588] Endpoint Service

[0589] One embodiment may include an endpoint service that may beresponsible for performing end-to-end messaging between two peers, usingone of the underlying peer-to-peer platform transport protocols, such asTCP or HTTP bindings. The endpoint service may be used by other servicesor applications that need to have an understanding of the networktopology, such as a resolver service or a propagation service. In oneembodiment, the endpoint service is not responsible for routing messagesfor peers that are not directly connected to each other. This task isperformed by the endpoint router transport protocol that may provide theillusion that the source and destination peers are directly connected.

[0590] In one embodiment, when the endpoint service transmits a messageit may add the source peer identifier as an element to the message. Inone embodiment, the element is a representation of the peer identifierat the point of emission of the message. In one embodiment, thisinformation is optional and may be used by the emitter endpoint serviceto detect and eliminate propagated messages that loop back to theemitter. If this element is not present, the message may be assumed tonot be looping back.

[0591] The endpoint service may expect incoming and outgoing messages tohave a source address and a destination address. The encapsulation ofthat information is specified by the message wire format being used. Inone embodiment, the source and destination addresses of a message may berepresented as strings in URI format.

[0592] In one embodiment, the endpoint service may delegate the sendingof outgoing messages to the endpoint protocol designated by a “protocol”part of the message's destination address. In one embodiment, theendpoint service may deliver incoming messages to the listenerregistered under the name that matches a concatenation of “unique nameof recipient” and “unique name in recipient context” portions of themessage's destination address.

[0593] Endpoint Router Transport Protocol

[0594] One embodiment may include an endpoint router transport protocolthat is a logical peer-to-peer platform transport protocol at a level“below” the endpoint service and with one or more other transportprotocols such as TCP and HTTP Transport Protocols. The endpoint routermay be responsible for exchanging messages between peers that do nothave a direct connection between each other. The endpoint router mayprovide a virtual direct connection to the peer's endpoint service.

[0595] In one embodiment, the endpoint router transport protocol definesa set of query and response messages that may be used to communicatewith instances of the endpoint router on other peers. In one embodiment,the messages may be sent and received by the endpoint router using aresolver service. These messages may include one or more of, but are notlimited to:

[0596] Route query: when the endpoint router is requested to send amessage to a peer for which it does not have yet a route for, theendpoint router may send a route query request to other peers. One ormore peers that have a route for the given peer may answer with routeresponses.

[0597] Route response: a peer that desires to inform another peer abouta give route may send a route response to the other peer. A routeresponse may be a reply to a route query.

[0598] Ping query: a ping query may be sent to a peer in order tovalidate a route. A peer receiving a ping query is requested to answerwith a ping response.

[0599] Ping response: a ping response may be sent to an originator of aping query.

[0600] In one embodiment, the endpoint router may define aninformational message that requires no reply. This message may be sentby any peer that detects that a route used by another peer is not valid.For example, a router peer that is requested to route a message to apeer for which it does not have a route may send an informationalmessage. In one embodiment, the informational message is optional:routers are not required to send them. While an informational message istypically sent to the source peer of a message, peers may sendinformational messages to other peers of their choice.

[0601] In one embodiment, the endpoint router transport protocol mayappend a message element to each message it transports. In oneembodiment, the element may be a markup language (e.g. XML) document. Inone embodiment, the element may include one or more of, but is notlimited to, the following:

[0602] Source: the original endpoint address of the source of themessage. In one embodiment, this may be required.

[0603] Destination: the original endpoint address of the destination ofthe message. In one embodiment, this may be required.

[0604] Last Hop: The endpoint router endpoint address of the last routerthat processed the incoming message to route. In one embodiment, thismay be required.

[0605] Number of hops: the number of the peers the incoming message toroute has already been through. In one embodiment, this may be required.

[0606] Forward Route: a list of one or more endpoint router endpointaddresses of the peers the message is supposed to go through in order toreach its destination. In one embodiment, this list is optional sinceeach router may use a query route request in order to find a route. Thislist may be used to preferably decrease the network traffic by limitingthe use of queries, which may be expensive.

[0607] Reverse Route: a list of one or more endpoint router endpointaddresses of the peers the message is supposed to go through in order toreach its source. In one embodiment, this list is optional since eachrouter may use the query route request in order to find a route. Thislist may be used to preferably decrease the network traffic by limitingthe use of queries, which may be expensive.

[0608] In one embodiment, queries and responses defined by the endpointrouter transport protocol may be sent using a resolver service. In oneembodiment, the messages may be represented by a markup language (e.g.XML) document (passed to and by the resolver service). In oneembodiment, endpoint router transport protocol messages may include oneor more of, but is not limited to, version information, type information(e.g. route query, route response, ping query, ping response, orinformational message), destination peer (e.g. endpoint router endpointaddress), routing peer (e.g. endpoint router endpoint address), routingpeer advertisement, number of hops, and gateway forward (e.g. endpointrouter endpoint address).

[0609] In one embodiment, depending on the type of the message, only asubset of the above may be used. For a route query, destination peer mayinclude the peer identifier (in its endpoint router definition) of thepeer for which a route is requested. For a route response, destinationpeer may include the peer identifier (in its endpoint router definition)of the peer for which a route was requested. Routing peer may includethe endpoint address of the peer that knows how to route message to thedestination peer. Routing peer advertisement may optionally include thepeer advertisement of the routing peer, which if included may allow therequesting peer to not have to search for the advertisement later on.Number of hops may indicate the number of hops of the route starting atthe routing peer. Gateway forward may include the endpoint address(es)of routing peer(s) within the route. In one embodiment, gateway forwardis a list of that may define the entire route to be used starting at therouting peer in order to reach the destination. In one embodiment,endpoint routers are not required to fill up this list; however, fillingthe list may be desired if the endpoint router desires to use theoptimization of embedding the forward route within the message.

[0610] For a ping query, destination peer may include the peeridentifier (in its endpoint router definition) of the peer for which aping is requested. For a ping response, destination peer may include thepeer identifier (in its endpoint router definition) of the peer forwhich a ping was requested. For an informational message, destinationpeer may include the peer identifier (in its endpoint router definition)of the peer for which the route has failed. If a message for which aroute has failed includes a list in gateway forward, this list may beincluded in the informational message.

[0611] In one embodiment, the endpoint router transport protocol mayappend an endpoint router message element to messages it transports. Inone embodiment, the element may be a markup language (e.g. XML)document. In one embodiment, the element may include one or more of, butis not limited to, a source, a destination, a last peer, a number ofhops, a gateway forward, and a gateway reverse. The source may includethe endpoint address of the original source of the message. Thedestination may include the address of the original destination of themessage. The last peer may indicate the address of an immediatelyprevious peer that has received the message. The number of hops mayindicate the number of hops of the reverse route (0 if there is noreverse route.) The gateway forward may include the endpoint address(es)of one or more routing peers within the forward route. In oneembodiment, gateway forward may be a list that defines the route to beused in order to reach the destination peer of the message. In oneembodiment, endpoint routers may not be required to fill up this list;however, doing so may decrease latency of communication between peers.Gateway reverse may include the endpoint address(es) of one or morerouting peers within the reverse route. In one embodiment, gatewayforward may be a list that defines the route to be used in order toreach the source peer of the message. In one embodiment, endpointrouters may not be required to fill up this list; however, doing so maydecrease latency of communication between peers.

[0612] In one embodiment, the endpoint router transport protocol mayhave its own endpoint address format. The following is an exemplaryendpoint address format for the endpoint router transport protocol andis not intended to be limiting:

[0613] xxxx://uuid-<PeerID unique value>

[0614] Routing

[0615] In one embodiment, the peer-to-peer platform may provide amechanism or mechanisms for searching and accessing peers, peer groups,content, services and other information in a dynamic topology of peersand peer groups, where peers and peer groups can come and go. In oneembodiment, peers and peer groups may come and go potentially withlimited or no control and notification. Peers may connect to apeer-to-peer network through various wired and wireless protocols,including “not connected” protocols such as may be used by mobileconsumer devices such as pagers and PDAs. Peers may also have to crossboundaries, for example boundaries created by firewalls and NAT (NetworkAddress Translation) routers, to connect to other peers.

[0616] In one embodiment, an application that supports the peer-to-peerplatform may help in routing and discovering. Some of the informationneeded to accomplish routing and discovering may be only known by theapplication. For example, the application may support a special type ofdata as content, and so the application may best “know” how to discoveritems of this special content. Also, the application may have a betterknowledge of the topology (related to the nature of the applicationand/or peer group) than the core peer-to-peer platform.

[0617] In one embodiment, in order to bootstrap the system, and also inorder to have a fallback mechanism if an application cannot or does notsupport one or more of the tasks, the core peer-to-peer protocols mayprovide a discovery and router mechanism for discovering peers and othercore abstractions such as advertisements, pipes, and peer groups. In oneembodiment, the discovery and routing mechanism of the peer-to-peerplatform may use as few protocols as possible, is simple, and makes useof underlying optimizations when available. Hooks into the corediscovery and router mechanism may be provided so that applications andservices may participate in the discovery and router mechanisms, forexample, by passing information to the core discovery and routermechanism. In one embodiment, an application or service may be allowedto override the core discovery and router mechanism with its own custommechanism.

[0618] In one embodiment, the core discovery and router mechanism may bebased on web crawling. Web crawling may be well suited for use inself-organizing networks such as peer-to-peer networks. In oneembodiment, peers may be configured to participate or not to participatein the discovery and router mechanism, and may be configured as to thelevel of involvement in the process In one embodiment, a peer may decidewhether to participate in a discovery or routing task depending on thepeer's configuration in the peer-to-peer network. In one embodiment, theconfiguration may be determined using an automated detection of theposition of the peer on the network and a network configuration wizardtool.

[0619] Web crawling may not create bottlenecks such as may be created bythe mechanism of a client knowing a server and always going to the sameserver to find and retrieve information (e.g. DNS, NFS etc.). Even if aserver is replicated, like DNS, it is still a centralized server. If allthe known instances of the server are not reachable, a client may loseaccess to the server, even if another (but unknown) server is, indeed,available. In a point-to-point network, the information a peer islooking for is generally “close by” or may eventually be “close by”, soweb crawling may not go too far.

[0620]FIG. 18 illustrates several core components and how they interactfor discovery and routing according to one embodiment. Application 300may use discovery 308 to find peers, peer groups, advertisements, andother entities on the peer-to-peer network, and may also publish pipe,peer, peer group, service, and other advertisements for access by otherpeers, applications and services on the peer-to-peer network. In oneembodiment, the endpoint 310 may be responsible for exchanging messagesbetween peers that are directly “connected” to each other (i.e. thepeers can reach each other without any routing and/or discovering). Whenavailable, multicast may be used to discover peers that the endpoint canreach (multicast is a mechanism which has been introduced in IP in orderto optimize this kind of process). In addition to that, or whenmulticast is not available, A rendezvous and invitation mechanism mayalso be provided. The rendezvous and invitation method may be used, forexample, if multicast is not available. For example, HTTP does notprovide multicast capabilities.

[0621] The endpoint router 312 may manage a cache of routes, for exampleroutes to remote peers. In one embodiment, the endpoint router 312 maybe configured from caching no routes to caching all routes it is awareof, depending on what the configuration wizard has decided with usercontrol. The endpoint router 312 may also forward (route) messagesdepending on what is found in the cache, and what has been configured.For instance, the endpoint router 312 may be configured to route search(propagate) requests or to not route the requests.

[0622] In one embodiment, the generic resolver 308 is a protocol thatimplements a sort of RPC (query/response) protocol on top of theendpoint 310. Discovery 306 and pipe resolver 304 may use the genericresolver. In one embodiment, discovery 306 may be responsible forsearching, caching and generating core advertisements (e.g. peer, peergroup, and pipe advertisements). Discovery 306 may use the genericresolver 308 to send query messages and to receive answers. In oneembodiment, discovery 306 may be aware of rendezvous peers and may havean invitation mechanism that may be used to assist the generic resolver308. In one embodiment, the pipe resolver 304 may be responsible forlocalizing the receiving end of a pipe 302 given a pipe advertisement.In one embodiment, the pipe resolver 304 does not search for a pipeadvertisement. In one embodiment, the pipe resolver 304 may beconfigured to manage a cache of the locations of the receiving ends(i.e. receiving peers) of the pipe 302.

[0623] The pipe protocol may use the endpoint 310 for transferringmessages (with the potential help of the endpoint router 312) betweenthe sending end of the pipe 302, and the receiving end of the pipe 302.In one embodiment, a pipe 302 may be viewed as an endpoint 310 that hasnot been bound to a particular peer. In one embodiment, a pipe 302 maybe moved seamlessly from one peer to another. In one embodiment, a pipe302 may also provides uniqueness that may not be provided by an endpoint310 since a pipe identifier is unique in time and space, and an endpoint310, being a network address, may not be.

[0624] A discovery and router mechanism based on web crawling may betime-expensive, and higher level protocols (such as applications) mayhave information that the core is not aware of that may help in the webcrawling process. In one embodiment, to enable applications toparticipate in the process, components of the core mechanism may providehooks that enable the applications to assist in the process (e.g. byproviding information). Some transport protocols such as HTTP may beconfigured for and/or dynamically learn about web rendezvous peers itcan use. An application may be provided access to the list of rendezvouspeers. In one embodiment, an application may be allowed to set/unsetroutes in an endpoint router 312. Each route may be qualified to routeor not route propagate messages such as web crawling messages and/orunicast messages. The endpoint router 312 may be viewed as a route cachemanager, which is may be controlled by an endpoint 310 and/or otherentities that may need to control it. In one embodiment, an endpointrouter 312 may be able to discover unknown routes from applications. Inone embodiment, discovery 308 may be configured (statically and/ordynamically) to control the nature and the amount of data that itmanages. In one embodiment, discovery 308 may be taught where to gosearch, or where not to go search. In one embodiment, discovery 308 maymake an “upcall” to a search/retrieve mechanism. In one embodiment, apipe resolver 304 may manage a cache of input pipes (receiving ends). Inone embodiment, pipe resolver 304 may be accessed by applications toset/unset entries in the cache.

[0625] Router Peers

[0626]FIG. 19 illustrates one embodiment of message routing in apeer-to-peer network that uses the peer-to-peer platform. Peers 200 inpeer groups 210A and 210B may communicate with each other through one ormore router peers 244. In one embodiment, message routing may routemessages to “unreachable” peers, i.e. may allow messages sent from apeer 200 to reach peers 200 that are otherwise unreachable. Networks maybe partitioned by firewalls, NAT (Network Address Translation) routers,etc. Message routing may allow messages to be delivered in partitionednetworks. Message routing may also allow peers 200 separated by one ormore partitions to participate in the same peer group(s) 210. Messagerouting may provide optimized message delivery, for example byoptimizing routes between peers 200. Message routing may allow for anadaptive peer-to-peer network (e.g. peers may move to remote locationsand still receive messages). Message routing may provide load balancing.In one embodiment, any peer may be a router peer 244.

[0627] One embodiment may provide for HTTP routing servers. In oneembodiment, HTTP routers may provide for message routes that traversefirewalls. In one embodiment, HTTP routers may provide NAT support. Inone embodiment, HTTP routers may act as message gateways (TTL). TTLstands for Time To Live (how long the request lives in the system).

[0628] The widespread use of NAT (Network Address Translation) andfirewalls may affect the operation of many P2P systems. It also mayaffect the peer-to-peer platform. In particular, a peer outside afirewall or a NAT gateway cannot discover peers inside the firewall orthe NAT gateway. In the absence of getting system administrators to letthe peer-to-peer platform traffic through (say by opening a specialincoming port at the firewall or gateway), possible methods to deal withthis problem include, but are not limited to:

[0629] In one embodiment, peers inside firewalls may be asked toinitiate connections to peers outside the firewall.

[0630] In one embodiment, peer nodes may be set up that operate likemailbox offices where traffic to a peer inside the firewall is queued upto be picked up at a designated relay peer outside the firewall. Thepeer inside the firewall can initially reach outside the firewall,select a relay peer, and widely advertise this fact. Later, it canperiodically contact the relay peer to retrieve messages.

[0631] One embodiment of the peer-to-peer platform may provide routerpeers. The router peers may be at a lower level than rendezvous peers.The router peers may provide “pure” message routing. By looking at thedestination and source addresses, the router peer may determine where amessage needs to be sent. In one embodiment, a router peer may call oraccess a rendezvous peer to “discover” information about peers, etc. Inother words, the router peer may access information from a rendezvouspeer to use the information in routing messages.

[0632] In one embodiment, router peers may provide the lowest messagerouting layer in the peer-to-peer platform. Routing may involve complextopologies. For example, the routing peers may provide a method to routeacross a firewall, particularly from peers outside the firewall to peersinside the firewall. A peer cannot send a message directly to anotherpeer behind a firewall, since by definition there may be no direct routefrom a peer outside the firewall to a peer inside the firewall. A routerpeer may route messages to a gateway peer (a mailbox server wheremessages for peers behind the firewall may be temporarily stored). Inone embodiment, the gateway peer may be a router peer acting as agateway. The peers behind the firewall may periodically poll themailboxes provided by the gateway peer to determine if someone has triedto contact them (i.e. are there any messages in my mailbox?). Note thata “pipe” provides an abstraction at a higher level than the messagerouting provided by router peers, and thus, a pipe may be an abstractionacross the network topology between peers, for example peers on oppositesides of a firewall, through which the peers may communicate. At thelowest level, one or more router peers may discover and establish theactual communications route between the peers. This level, however, maybe transparent to the peers, who only “see” the pipes.

[0633] In one embodiment, a router peer may build a route table. Therouter peer may keep information about routes that it discovers andstore them in the route table. This allows the router peer to build aknowledge base (the route table) about the network topology as moremessages flow on the system. This information may be used by the routerpeer to discover and establish optimal routes between entities in thenetwork, and may increase its ability to reach other peers.

[0634] A router peer may access another router peer it is aware of toget route information. The route information may be described as astacked set of destinations (and the routes to the destinations). In oneembodiment, the information the router peer stores on a particular routemay be incomplete, because the router peer may only know about the routeup to a certain point. For example, the router peer may know about afirst portion of a route up to another router peer, which knows aboutthe next portion of the route, and so on.

[0635] In one embodiment, each peer has a unique peer identifier that isindependent of, and is not assigned to, fixed addresses. Peers may movearound. Therefore, the peer-to-peer network topology may be dynamic, andmay change every time a peer goes away or moves. Thus, in oneembodiment, the routing method provided by the router peers may bedynamic to support the dynamic topology. When a peer moves andreconnects, the peer is recognized as the same peer that was previouslyconnected elsewhere in the network. This process may use the uniqueidentifier of the peer to indicate that the peer is the same one thatwas previously connected elsewhere. In one example, when a peer moves,it may go through a discovery process to discover peers and rendezvouspeers in its new local subnet or region. If the peer wishes to join apeer group that it used at its previous location, it may then attempt todiscover other peers that have knowledge of the peer group or otherpeers in the peer group. The message may be passed through severalrouter peers until it may reach a router peer that has knowledge aboutthe peer group (e.g. a route to the peer group) to return to therequesting peer. For example, a user with a laptop may fly from a homeoffice to another city. When the user connects to the network in theother city, a route may be established, through the services provided byrouter peers, to the home office network peer group. The user may thenaccess email and other services provided by the peer group. From theuser's standpoint, this process may seem automatic. For example, theuser may not be required to “dial in” or connect remotely to an ISP toaccess the office as is required in typical networks using staticaddressing.

[0636] In one embodiment, when a peer becomes a router peer, it mayaccess a stored route table as a starting point. In one embodiment, thepeer may start from scratch with an empty route table. In oneembodiment, the peer, when it becomes a router peer, may initiate adiscovery of other router peers and/or rendezvous peers to get as muchconnectivity information to key peers in the network as possible.

[0637] In one embodiment, every peer may have knowledge of at least onerouter peer. In one embodiment, there may be a “universal router” thatmany or all peers may be aware of that may be accessed when a peercannot find anyone. The universal router may be able to put the peerinto contact with somebody (e.g. another peer) to help in thebootstrapping process.

[0638] Security

[0639] In one embodiment, to support different levels of resource accessin a dynamic and ad hoc peer-to-peer network, the peer-to-peer platformmay provide a role-based trust model in which an individual peer may actunder the authority granted to it by another trusted peer to perform aparticular task. Peer relationships may change quickly and the policiesgoverning access control need to be flexible in allowing or denyingaccess. In one embodiment, the trust model may provide securityincluding, but not limited to, confidentiality, authorization, dataintegrity and refutability. Confidentiality guarantees that the contentsof the message are not disclosed to unauthorized individuals.Authorization guarantees that the sender is authorized to send amessage. Data integrity guarantees that a message was not modifiedaccidentally or deliberately in transit. Refutability guarantees amessage was transmitted by a properly identified sender and is not areplay of a previously transmitted message.

[0640] In one embodiment, peer-to-peer platform messages are structuredto allow peer-to-peer platform services and applications to addarbitrary metadata information to the messages such as credentials,digests, certificates, public keys, etc. A credential is a token thatwhen presented in a message body is used to identify a sender and can beused to verify that sender's right to send the message to the specifiedendpoint. The credential is an opaque token that must be presented eachtime a message is sent. The sending address placed in the messageenvelope may be cross-checked with the sender's identity in thecredential. Each credential's implementation is specified as a plug-inconfiguration, which allows multiple authentication configurations toco-exist on the same network. Message digests guarantee the dataintegrity of messages. Messages may also be encrypted and signed forconfidentiality and refutability.

[0641] In one embodiment, the peer-to-peer platform protocols may becompatible with widely accepted transport layer security mechanisms formessage-based architectures such as Transport Layer Security (TLS),Secure Sockets Layer (SSL), and Internet Protocol Security (IPSec).However, secure transport protocols such as TLS, SSL and IPSec may onlyprovide the integrity and confidentiality of message transfer betweentwo communicating peers. In order to provide secure transfer inmulti-hops network, a trust association may be established among all theintermediary peers. Security is compromised if anyone of thecommunication links is not secured. One embodiment of the peer-to-peerplatform may provide a virtualized Transport Layer Security (TLS)implementation that allows secure endpoint-to-endpoint communicationsregardless of the number of hops required to deliver each message.

[0642] The peer-to-peer platform security model may be implemented toprovide a P2P web of trust. The web of trust may be used to exchangepublic keys among its members. Each peer group policy may permit somemembers to be trusted to the extent that they have the authority to signpublic keys for other members as well as to do things like authenticate,add new members, and remove or revoke membership. The security modulemay be available to the core level, and thus services, applications andadvanced services

[0643] In one embodiment, peer-to-peer platform messages are structuredto allow peer-to-peer platform services and applications to addarbitrary metadata information to the messages such as credentials,digests, certificates, public keys, etc. A credential is a token thatwhen presented in a message body is used to identify a sender and can beused to verify that sender's right to send the message to the specifiedendpoint. The credential is an opaque token that must be presented eachtime a message is sent. The sending address placed in the messageenvelope may be cross-checked with the sender's identity in thecredential. Each credential's implementation is specified as a plug-inconfiguration, which allows multiple authentication configurations toco-exist on the same network. Message digests guarantee the dataintegrity of messages. Messages may also be encrypted and signed forconfidentiality and refutability.

[0644] In one embodiment, the peer-to-peer platform protocols may becompatible with widely accepted transport layer security mechanisms formessage-based architectures such as Transport Layer Security (TLS),Secure Sockets Layer (SSL), and Internet Protocol Security (IPSec).However, secure transport protocols such as TLS, SSL and IPSec may onlyprovide the integrity and confidentiality of message transfer betweentwo communicating peers. In order to provide secure transfer inmulti-hops network, a trust association may be established among all theintermediary peers. Security is compromised if anyone of thecommunication links is not secured. One embodiment of the peer-to-peerplatform may provide a virtualized Transport Layer Security (TLS)implementation that allows secure endpoint-to-endpoint communicationsregardless of the number of hops required to deliver each message.

[0645] The peer-to-peer platform security model may be implemented toprovide a P2P web of trust. The web of trust may be used to exchangepublic keys among its members. Each peer group policy may permit somemembers to be trusted to the extent that they have the authority to signpublic keys for other members as well as to do things like authenticate,add new members, and remove or revoke membership. The security modulemay be available to the core level, and thus services, applications andadvanced services and applications may plug in their own securitycomponents and protocols. For example, the web of trust may be definedby a policy that requires authorized peer group members to be well-knowncertificate authorities, and that peers exchange X509v3 CA signedcertificates.

[0646] In one embodiment, peer group security may establish a “socialcontract”. The role of security is distributed across peer groups, andacross members of peer groups, that all agree to participate by therules. A peer group may establish the set of rules by which security inthe group is enforced. A peer may join the peer group with a low levelof security clearance (low trust). If the peer stays in the group andbehaves (follows the rules), the peer may build up its level of trustwithin the group, and may eventually be moved up in its security level.Within peer groups operating under a social contract, certificatesand/or public keys may be exchanged without the participation of astrict certificate authority; i.e. the members may exchange certificatesbased upon their trust in each other. In one embodiment, a peer groupmay use an outside challenge (e.g. a secret group password) that may beencrypted/decrypted with public/private keys, as a method to protect andverify messages within the group. In one embodiment, peer groups may beconfigured to use other types of security, including a high level ofsecurity, for example using a strict certificate authority, and even nosecurity. In one embodiment, peer-to-peer platform messages exchangedwithin a group may have a “placeholder” for security credentials. Thisplaceholder may be used for different types of credentials, dependingupon the security implementation of the particular group. In oneembodiment, all peer-to-peer messages within the group may be requiredto have the embedded credential. One embodiment may support privatesecure pipes.

[0647] Peer-to-Peer Platform Firewalls and Security

[0648] The peer-to-peer platform may provide one or more methods fortraversing firewalls. FIG. 20 illustrates traversing a firewall 248 in avirtual private network when access is initiated from outside onlyaccording to one embodiment. Peers 200 on either side of the firewall248 may each belong to one or more peer groups. In one embodiment, entrymay be restricted to peers 200 with access privileges. In this example,peers 200A and 200B have access privileges, but peer 200C does not.Thus, peers 200A and 200B may access peers 200D and 200E throughfirewall 248. In one embodiment, HTTP “tunnels” may be used, withproxies 246 in the “DMZ” of the firewall 248.

[0649]FIG. 21 illustrates email exchange through a firewall 248 via anemail gateway 260 according to one embodiment. In this example, peers200A and 200B outside the firewall 248 may exchange messages to peers200C and 200D via the email gateway 260. In one embodiment, there may bean SMTP (Simple Mail Transfer Protocol) service 262 on each peer 200. Inone embodiment, 100% peer-to-peer access may not be guaranteed. In oneembodiment, inside the firewall 248, mail account administration mayimpose restrictions. In one embodiment, email addresses may not berequired for all peers 200 outside of the firewall 248.

[0650]FIG. 22 illustrates several methods of traversing a firewall 248when access is initiated from the inside according to one embodiment.One or more peers 200 may be inside the firewall 248, and one or morepeers 200 may be outside the firewall 248. In one embodiment, each peer200 that needs to traverse firewall 248 may include a mini-HTTP server.In this embodiment, an HTTP proxy may be used to provide peer-to-peerHTTP tunnels 264 through firewall 248. In one embodiment, Secure Shell(SSH) tunnels 266 may be used to traverse firewall 248. One embodimentmay support SOCKS connections 268 if SOCKS is supported in the firewall248. SOCKS is typically used to telnet/ftp to the “outside.” Otherembodiments may include other methods of traversing firewalls.

[0651] In one embodiment, peer-to-peer platform core protocols may beused for firewall traversal. In one embodiment, the impact on thepeer-to-peer protocol core may be minimized in the traversal method. Inone embodiment, peers may use the “pure” core protocols for traversalwhenever possible. In embodiments where the core protocols need to beextended for traversal, a “divide and conquer” technique may be used. Ina divide and conquer technique, any new configurations (policies) may beisolated behind the firewall. A proxy or proxies may then be used tomediate with and bridge to the core protocols.

[0652] In one embodiment, peers on either side of the firewall mayinitiate peer group contact with full peer-to-peer protocolimplementation including, but not limited to, the ability to initiatepeer group discovery, the ability to join/leave peer groups, and theability to create end-to-end pipes (cipher text data exchange whenrequired).

[0653]FIG. 23 illustrates one embodiment of a peer-to-peer platformproxy service 270, and shows various aspects of the operation of theproxy service. One or more peers 200 may be inside a firewall 248, andone or more peers 200 may be outside the firewall 248. Peer-to-peerplatform proxy service 270 is also shown outside the firewall 248. Proxyservice 270 may be used to enable peer 200 and peer group contact acrossfirewall 248. Firewall 248 may include an email gateway 260. In oneembodiment, the proxy service 270 may be used to bridge peer-to-peerplatform protocols 272 with HTTP 274, email 276 and/or SOCKS 278. Theproxy service 270 may allow peers 200 to send requests to communicateacross firewall 248. Through the proxy service 270, peer-to-peerplatform messages may be posted for delivery across the firewall 248. Inone embodiment, the proxy service 270 may allow secure pipes to beestablished across the firewall 248 as necessary.

[0654]FIG. 24 illustrates a method of using a proxy service for peergroup registration according to one embodiment. The proxy service maypermit firewall-independent peer group membership. Three peer regions212 are shown, with two (region 212A and 212B) on one side of firewall248 and one (region 212C) on the other side of firewall 248. A peergroup 210 may be established that extends across the firewall 248 intoregions 212A, 212B and 212C. One or more peers 200 in each region 212may be members of the peer group 210.

[0655]FIG. 25 illustrates peer group registration across a firewallaccording to one embodiment. Peer region 212A is shown outside of afirewall 248 and peer region 212B is behind the firewall 248. Peerregion 212A includes a peer-to-peer platform proxy service 270 andseveral peers 200. In one embodiment, a peer 200 may be serving as aproxy peer that provides the proxy service 270. Peer region 212Bincludes several peers 200 behind the firewall 248. At some point, peer200D in peer region 212B may form a peer group 210. An advertisement forthe peer group 210 may be registered on the proxy service 270 in theregion 212A. One or more peers 200 in region 212A may be notified of thenewly registered peer group 200 by the proxy service 270. In oneembodiment, the proxy service may also notify other known peer-to-peerplatform proxy services in this or other regions 212, who in turn maynotify other proxy services, and so on. Peers 200 in region 212A maythen apply for membership in peer group 200.

[0656]FIG. 26 illustrates a method of providing peer group membershipthrough a peer-to-peer platform proxy service according to oneembodiment. Peer regions 212A and 212B are shown outside of a firewall248, and peer region 212C is behind the firewall 248. The two peer groupregions 212 outside the firewall 248 each include a proxy service 270.At least one of the peers (peer 200F, in this example) in region 212Cbehind the firewall belongs to a peer group 210. The peer group 210 maybe registered with the proxy services 270 in the regions 212A and 212Boutside the firewall 248. A peer 200 in either of the regions outsidethe firewall may join the peer group 200 by proxy through the proxyservice 270 in its region 212. Peers 200 in the regions 212 outside thefirewall 248 that are members of the peer group 210 may also leave thepeer group 210 through the proxy service 270. Membership information(e.g. included in peer group advertisements) for the peer group 200 maybe synchronized on all known proxy services 270 outside the firewall248. In one embodiment, a proxy service 270 may be a member peer of alllocally registered peer groups 200.

[0657] Several levels of authentication may be provided in one or moreembodiments of the peer-to-peer platform. Anonymous login may beprovided in one embodiment. In one embodiment, a plain text login (useror user and password) may be provided. In one embodiment, login withprivacy may be provided. In this embodiment, public key exchange may beused and/or a symmetric master key. In one embodiment, the login processmay return a credential to the joining peer so that the peer may bypassthe login process until the credential expires. One embodiment mayprovide a public key chain that may be used by registered users toeliminate public key exchanges and thus provides unauthenticated access.On embodiment may provide secure public key exchange with signedcertificates.

[0658]FIGS. 27A and 27B illustrate a method of providing privacy in thepeer-to-peer platform according to one embodiment. FIG. 27A shows a peerregion 212 with peers 200A and 200B and a peer-to-peer platform proxyservice 270. Peers 200A and 200B may fetch and cache public keys from apublic key chain 280 of the proxy service 270. The cached public keysmay have expiration dates. Peers 200A and/or 200B may compute a mastersecret key for one or more of the public keys. Using the keys, ciphertext may be exchanged between peers 200A and 200B in privacy asillustrated in FIG. 27B.

[0659] The peer-to-peer platform may include one or more methods forproviding data integrity in the peer-to-peer environment. These methodsmay be used to insure that what is sent is what is received. Oneembodiment may use a standard hash on data (e.g. Secure Hash Algorithm(SHA-1) as defined by the Secure Hash Standard of the FederalInformation Processing Standards Publication 180-1). A weak form and/ora strong form may be used in embodiments. In one embodiment, the weakform may use a public key ring and symmetric master to sign data. Thismethod may work best between two peers each having he other's publickey. In one embodiment, the strong form may use a symmetric keyalgorithm such as RSA (Rivest-Shamir-Adleman) and certificateauthorities. In one embodiment, the peer-to-peer platform may provide aproxy public certificate authority service. The authority service maycreate, sign and distribute certificates (e.g. X509 certificates) forall peers on a public key chain. In one embodiment, the proxy service'spublic key may be resident on each proxied peer. Other embodiments mayutilize other integrity methods.

[0660]FIGS. 28A and 28B illustrate one embodiment of a method for usinga peer-to-peer platform proxy service as a certificate authority. FIG.28A illustrates a peer region 212 with several peers 200 and a proxyservice 270. The proxy service 270 may distribute signed certificates inresponse to peer requests as required. The peers 200 may validate theproxy service 270 signature using a proxy service public key. Asillustrated in FIG. 28B, when exchanging content with other peers 200, apeer 200 may sign the content with the destination peer's public key anddistribute the cipher text.

[0661] Decentralized Peer-to-Peer Advertisement

[0662] As described above, embodiments of the peer-to-peer platform mayprovide a mechanism or mechanisms to query peers for shared resources(e.g. advertisements, pipe instances, etc.). These mechanisms may relyon multi-hop discover of advertisements, which may cause unnecessarytraffic to be propagated regardless of whether a destination has aresponse to the query. Queries may be propagated in a semi-controlledmanner, without discretion as to whether the receiving end is likely tohave a response. In situations where a query cannot be fulfilled, thequery may potentially reach every peer several times, which may resultin query flooding.

[0663] Embodiments of a shared resource distributed index mechanism thatpeers in a peer-to-peer network may utilize to distribute index entriescorresponding to resources (e.g. software modules such as services andapplications, peers, peer groups, pipes, etc) to indexes of sharedresources among one or more other peers, for example rendezvous peers,are described. These indexes may be used to direct queries in thedirection where the queries are most likely to be answered. When a queryis received by a peer (e.g. rendezvous peer) including one or moreindexes, contents of the query may be “looked up” in the index(es) tofind matches. The results of the lookup may include information on oneor peer(s) that may hold advertisement(s) to the resource requested bythe query. The query may then be forwarded to one or more peers that mayhold the advertisement for the resource as indicated by the lookupresults. In one embodiment, the mechanism may fall back on multi-hopdiscovery if no peer is found that may satisfy a query.

[0664] Embodiments of the shared resource distributed index mechanismmay help to reduce query flooding, reduce latency, and/or shorten pathsfor queries. Embodiments of the shared resource distributed index mayallow peers to provide key/value pairs (index entries) to other peerssuch as rendezvous peers to be cached in indexes (e.g. hash tables) andused in query resolution, rather than providing entire advertisements.

[0665] Embodiments of the shared resource distributed index mechanismmay provide “loosely-coupled” distribution of index entries for use inquerying for resources in a peer-to-peer network. In loosely-coupleddistribution, a peer A may send index entries to a peer B. These indexentries are not (necessarily) replicated to other peers in thepeer-to-peer network. If a query is matched on peer B, the query isforwarded to peer A. If peer A disconnects from the network, the data(index entries) may go away (e.g. by garbage collection on peer B).Queries for a resource formerly advertised by peer A via index entriesprovided to peer B may still be satisfied, but not from peer A.

[0666] While the shared resource distributed index mechanism isgenerally described herein in regards to rendezvous peers includingcached indexes (e.g. hash tables) of key/value pairs in peer-to-peerenvironments implemented according to embodiments the peer-to-peerplatform described herein, it is noted that in some embodiments otherpeers than rendezvous peers may include cached indexes and receive indexentries from other peers. Further, embodiments of the shared resourcedistributed index mechanism may be implemented in other networkcomputing environments, including other peer-to-peer environments, thanpeer-to-peer environments implemented according to embodiments thepeer-to-peer platform described herein.

[0667] In one embodiment, peer-to-peer platform services that exposeresources such as discovery resources and pipes may share one or morekey/value pairs for the resources (e.g. elements of resourceadvertisements) which they desire to advertise, for example with arendezvous peer on initial connection to the rendezvous peer. Therendezvous peer may store these key/value pairs in one or more indexes.In one embodiment, the index(es) may be hash tables, and the key/valuepairs may be hashed and stored in the index(es). In one embodiment,deltas to the list of key/value pairs may be uploaded (or included in aquery) to the rendezvous peer to update the index(es) of key/valuepairs. In one embodiment, a rendezvous peer may leverage the mechanismof its relationship with a peer to garbage collect indexes/hashes whenthe peer severs the session with the rendezvous peer.

[0668] In one embodiment, advertisements for peer-to-peer resources mayinclude one or more elements or fields. Each element may be a key/valuepairs including a key (identifying the element) and a value for theelement. Advertisements may be indexed on one or more of these key/valuepairs. One or more of an advertisement's elements (key/value pairs) maybe distributed to other peers and added to indexes used for queryrouting or peer addressing. Thus, instead of (or alternatively inaddition to) publishing an advertisement for a resource, a peer maydistribute key/value pairs for the resource to one or more other(rendezvous) peers.

[0669] A query may include one or more key/value pairs that may becompared against one or more indexes of available key/value pairs. Whena peer receives a query requesting an advertisement to a particularresource, the query includes one or more key/value pairs associated withthe resource advertisement. The key/value pair(s) may be searched for(i.e. a lookup is performed) in one or more indexes on the receivingpeer (e.g. rendezvous peer) and, if a match or matches are found, thequery request may be routed to the one or more peers which may includeadvertisement(s) indicated by the match(es) in the one or more indexes.In one embodiment, a primary key is the key queries are compared to inan index. One or more keys from an advertisement may be designated asprimary keys, and for some advertisements, all keys may be primary keys.In one embodiment, the results of a lookup in an index may beinformation identifying the peer(s) that may include the advertisementfor the desired resource. In one embodiment, the results may be peeridentifier(s) that identify the one or more peers that may include theadvertisement.

[0670] In one embodiment, the indexes may be hash tables that includehashes of key/value pairs. In this embodiment, when a query is received,the key/value pair(s) from the query may be hashed and compared againstthe one or more indexes of available hashed key/value pairs. If a match(or matches) is found in the hash table, the query may be forwarded tothe peer(s) for which the query's key/value pair(s) matches an entry inthe index(es).

[0671] As an example, when performing peer discovery for a particularpeer, a peer may send a query to another peer (e.g. rendezvous peer).The query may include key/value pair(s) from a peer advertisement forpeer(s) with one or more attributes (indicated by the key/value pairs)of the particular peer. The other peer may include one or more indexesof key/value pairs. The other peer may perform a lookup on the index(es)for the key/value pair(s) from the query. If one or more matches arefound, the other peer may direct the query towards peer(s) that mayinclude the peer advertisement for the particular peer.

[0672]FIG. 34A illustrates a peer including an advertisement for aresource sending an index entry for the resource to a rendezvous peeraccording to one embodiment. The resource may be provided by the peer200A, or alternatively peer 200A may include one or more advertisementsfor resources provided by other peers 200. Peer 200A may include anadvertisement 808 for a resource (e.g. a peer advertisement, a peergroup advertisement, a pipe advertisement, a module advertisement,etc.). Advertisement 808 may include one or more key/value pairs 810.Peer 200A may send one or more of the key/value pairs 810 (in thisexample, key/value pair 810A) as index entries to the rendezvous peer290. In one embodiment, peer 200A may connect to the rendezvous peer 290at startup as described elsewhere in this document, and peer 200A mayupload the one or more index entries to the rendezvous peer 290 during astartup procedure. In one embodiment, peer 200A may send key/value pairs810 at any time to advertise resources on and/or advertised by peer200A. After receiving the key/value pair 810A, rendezvous peer 290 mayadd key/value pair 810A to index 812. In one embodiment, index 812 is ahash table, and key/value pair 810A may be hashed and added to thetable.

[0673]FIG. 34B illustrates a peer querying for a resource according toone embodiment. In one embodiment, peer 200B may send (e.g. broadcast) aquery 814 including a key/value pair 810E corresponding to a resourcethat peer 200B desires to locate and/or access. Rendezvous peer 290 mayreceive the query 814 and perform a lookup in index 812 for the queryusing the key/value pair 810E. In one embodiment, index 812 is a hashtable, and rendezvous peer 290 hashes the key/value pair 810E to performthe lookup. In this example, key/value pair 810E matches key/value pair810A sent to rendezvous peer 290 by peer 200A as described in FIG. 34A.Results of the lookup include information identifying peer 200A as atarget peer for the query. In one embodiment, the lookup returns a peeridentifier for peer 200A, for example a peer-to-peer platform peeridentifier as described herein.

[0674]FIG. 34C illustrates a rendezvous peer routing a query to a peerthat may be able to satisfy the query according to one embodiment. Inone embodiment, rendezvous peer may forward query 814 to one or morepeers identified in the lookup of the key/value pair 810E as describedin FIG. 34C. In one embodiment, rendezvous peer 290 may use the peeridentifier(s) returned in results of the lookup to forward the query 814to the respective peers. In this example, rendezvous peer 290 routesquery 814 to peer 200A, which was identified in the lookup as describedfor FIG. 34B as a possible target peer for the query.

[0675]FIG. 34D illustrates a peer to which a query was routed by arendezvous peer responding to the query according to one embodiment. Inthis example, peer 200A received the forwarded query from rendezvouspeer as described in FIG. 34C. Peer 200A may then respond to peer 200B(the originator of the query) to inform peer 200B that peer 200A has anadvertisement 808 for the resource requested by the query. Peer 200B maythen access the resource using the advertisement as described elsewherein this document, if desired.

[0676] In one embodiment, a peer may send index entries (key/valuepairs) for multiple advertisements to one or more other peers (e.g.rendezvous peers). These index entries may be added to indexes (e.g.hash table(s)) by the receiving peer. When queries are received for anyof these advertisements and a lookup is performed for any of theseadvertisements, the results of the lookup in the index may result in thepeer identifier for the peer including these advertisements. The queryis then routed to the peer holding these advertisements. In oneembodiment, the indexes may be hash tables, and received index entriesmay be hashed and added to the hash tables. Key/value pairs in queriesmay be hashed for lookup in the hash tables. Results may be returned aspeer identifiers for one or more peers that may include an advertisementto the desired resource and to which the query may be forwarded.

[0677]FIG. 35 is a flowchart illustrating a peer sending index entriesfor resource advertisement(s) to a rendezvous peer according to oneembodiment. As indicated at 900, a peer may send one or more indexentries (key/value pairs) for resource(s) to a rendezvous peer. Asindicated at 902, the rendezvous peer may add the one or more indexentries to an index on the rendezvous peer. In one embodiment, the indexis a hash table, and the index entry may be hashed and added to thetable.

[0678]FIG. 36 is a flowchart illustrating a peer querying for a resourceusing key/value pairs according to one embodiment. As indicated at 910,the peer may send (e.g. broadcast) a query for a particular resource toone or more other peers in the peer-to-peer network. The query mayinclude one or more key/value pairs that may be used to search indexesfor peers that may include an advertisement for the resource. Arendezvous peer may receive the query, either directly from the peer orafter multiple hops. The rendezvous peer may lookup the query in anindex as indicated at 912. In one embodiment, the index may be a hashtable, and the rendezvous peer may hash the one or more key/value pairsto perform the lookup in the hash table. If one or more matches arefound in the index, the rendezvous peer may forward the query to one ormore other peers identified by the one or more matches as indicated at914. In one embodiment, results of a match may return a peer identifierfor a peer that may include an advertisement for the desired resourceand is thus considered a target for the query, and the peer identifiermay be used to forward the query to the corresponding peer. As indicatedat 916, the one or more other peers may respond to the query bycontacting the peer that originated the query. The originating peer maythen access the resource using one of the advertisements if desired.

[0679]FIG. 37 illustrates a method for resolving queries in apeer-to-peer network according to one embodiment. As indicated at 920, apeer may send a query for a particular resource to one or more otherpeers in the peer-to-peer network. In one embodiment, local queries maybe propagated to neighboring peers (e.g. using a broadcast/multicastmethod). Peers receiving the query may propagate the query to otherlocal peers, for example using methods as described elsewhere in thisdocument. Queries beyond the local neighborhood of peers may be sent torendezvous peers. A rendezvous peer (or peers) may receive the query asindicated at 922. The rendezvous peer(s) may attempt to satisfy thequery against a local cache as indicated at 924. At 926, if a match isfound in a local cache, a rendezvous peer may answer the query from thelocal cache as indicated at 928 (e.g. by forwarding the query to a peeridentified in the local cache). At 926, if no match is found in thelocal cache, the query may be compared to one or more lists (indexes) ofstored/hashed key/value pairs (index entries) as indicates at 930 toattempt to find one or more matches. In one embodiment, the query mayinclude one or more key/value pairs for which matches may be searchedfor in the index. At 932, if one or more matches are found, the querymay then be forwarded to the peer(s) identified by the one or morematches in the index(es) as indicated at 936. In one embodiment, queriesmay indicate a query propagation threshold, and whether to honor thethreshold is up to the rendezvous peer, and ultimately the queried peer.For example, the rendezvous peer may forward the query to two peers toanswer a query defining a threshold of four peers.

[0680] At 932, in one embodiment, if no match for a query is found inthe index(es), the rendezvous peer may forward the query to one or moreother rendezvous peers on behalf the originator peer as indicated at934. In one embodiment, the rendezvous peer may utilize a peer walker toforward the query to the one or more other rendezvous peers. The one ormore other rendezvous peers may then repeat the process described in920-936 for the (first) rendezvous peer. In one embodiment, a rendezvouspeer may first attempt to resolve the query locally (e.g. through thelocal cache and/or index lookup). If the query cannot be resolvedlocally, a distributed hash table (DHT) service may be used to resolve aquery route, and the query may be forwarded to one or more otherrendezvous peers that may be able to determine the ultimatedestination(s) for the query. In one embodiment, once the query reachesthe destination peer(s) (peer(s) that may have a response for thequery), the destination peer(s) may respond directly to the queryoriginator as indicated at 938.

[0681] In one embodiment, rendezvous peers may include configurableproperties that may define the overall resources to be consumed insupport of shared resource distributed indexes, and that may impose aquota on the resources that may be used per peer.

[0682] In one embodiment, peers may detect and discard loopback queries.In one embodiment, rendezvous peers may not forward loopback queries tothe originator. In one embodiment, indexes may not be replicated amongrendezvous peers. In one embodiment, rendezvous peers may replicateindexes to other rendezvous peers. In one embodiment, replication ofresources may occur because of the natural behavior (e.g. publishing) ofpeers, and the quest for resources. In one embodiment, a DHT service maybe used to replicate indexes to provide direct query routing.

[0683] In one embodiment, rendezvous peers may share indexes. In oneembodiment, a rendezvous peer may provide a local index (and/or indexesreceived from other rendezvous peers) to one or more other rendezvouspeers, and/or receive one or more indexes from one or more otherrendezvous peers. Sharing indexes may allow other rendezvous peers toreceive, resolve and forward queries directly to target peers local toother rendezvous peers that may be able to satisfy the query, thusreducing latency and query flooding. In one embodiment, a peer that hasprovided a local index to another peer may send updates to the otherpeer. In one embodiment, only the changes (deltas) in the local indexmay be sent to the other peer.

[0684] In one embodiment, one or more messages may be defined for theshared resource distributed index mechanism. The following is anexemplary message format for the shared resource distributed indexmechanism and is not intended to be limiting: <shared resource index><service identifier>identifier</service identifier> <trn><trntype>(message type (add/update/etc.))</trntype><rectype>type</rectype> <key>key</key> <value>value</value> </trn></shared resource index>

Conclusion

[0685] Various embodiments may further include receiving, sending orstoring instructions and/or data implemented in accordance with theforegoing description upon a carrier medium. Generally speaking, acarrier medium may include storage media or memory media such asmagnetic or optical media, e.g., disk or CD-ROM, volatile ornon-volatile media such as RAM (e.g. SDRAM, DDR SDRAM, RDRAM, SRAM,etc.), ROM, etc. as well as transmission media or signals such aselectrical, electromagnetic, or digital signals, conveyed via acommunication medium such as network and/or a wireless link.

[0686] The various methods as illustrated in the Figures and describedherein represent exemplary embodiments of methods. The methods may beimplemented in software, hardware, or a combination thereof. The orderof method may be changed, and various elements may be added, reordered,combined, omitted, modified, etc.

[0687] Various modifications and changes may be made as would be obviousto a person skilled in the art having the benefit of this disclosure. Itis intended that the invention embrace all such modifications andchanges and, accordingly, the above description to be regarded in anillustrative rather than a restrictive sense.

What is claimed is:
 1. A peer computing system, comprising: a pluralityof peer nodes, wherein each peer node comprises a network interfaceconfigured to communicate with one or more other ones of said peer nodesover one or more networks, and wherein each peer node is configured tostore advertisements to network resources, wherein each network resourceadvertisement comprises a plurality of key/value pairs; one of theplurality of peer nodes configured to: cache an index comprising one ormore key/value pairs from one or more network resource advertisementsstored on others of the plurality of peer nodes, wherein each key/valuepair indicates a particular one of the others of the peer nodes that acorresponding network resource advertisement is stored on; receive aquery message from another one of the plurality of peer nodes, whereinthe query message requests a particular network resource, and whereinthe query message includes one or more key/value pairs of anadvertisement for the particular network resource; perform a search ofthe cached index for matches to the one or more key/value pairs from thequery message; and if one or more matching key/value pairs is found inthe cached index, forward the query message to one or more of theplurality of peer nodes indicated by the matching key/value pairs. 2.The peer computing system as recited in claim 1, wherein the cachedindex is a hash table comprising hashes of the one or more key/valuepairs from the one or more network resource advertisements, and wherein,to perform a search of the cached index for matches to the one or morekey/value pairs from the query message, the one of the plurality of peernodes is further configured to: hash the one or more key/value pairsfrom the query message; and compare the hashed one or more key/valuepairs from the query message to the one or more key/value pairs from theone or more network resource advertisements.
 3. The peer computingsystem as recited in claim 1, wherein, if one or more matching key/valuepairs is found in the cached index, said search returns a peeridentifier for each of the one or more of the plurality of peer nodesindicated by the matching key/value pairs.
 4. The peer computing systemas recited in claim 1, wherein the one of the plurality of peer nodes isa rendezvous peer configured to: cache network resource informationincluding one or more indexes of key/value pairs; and assist theplurality of peers in discovery of the network resources using thecached network resource information.
 5. The peer computing system asrecited in claim 1, wherein the one of the plurality of peer nodes isfurther configured to provide the cached index to another of theplurality of peer nodes.
 6. The peer computing system as recited inclaim 1, wherein each of the one or more of the plurality of peer nodesindicated by the matching key/value pairs is configured to: receive thequery message forwarded from the one of the plurality of peer nodes; andinform the other one of the plurality of peer nodes that the peer nodestores an advertisement for the particular network resource in responseto the query message.
 7. The peer computing system as recited in claim6, wherein the other one of the plurality of peer nodes is configured toaccess the particular network resource in accordance with theadvertisement for the particular network resource stored on one of theone or more of the plurality of peer nodes indicated by the matchingkey/value pairs.
 8. The peer computing system as recited in claim 1,wherein, if no matching key/value pair is found in the cached index, theone of the plurality of peer nodes is further configured to forward thequery message to at least one other peer node comprising a differentcached index of key/value pairs.
 9. The peer computing system as recitedin claim 1, wherein the one of the plurality of peer nodes is furtherconfigured to: receive one or more key/value pairs from at least one ofthe others of the plurality of peer nodes; and update the cached indexwith the received one or more key/value pairs.
 10. The peer computingsystem as recited in claim 1, wherein the one of the plurality of peernodes is further configured to garbage collect the cached index toremove key/value pairs from network resource advertisements stored onpeer nodes that are no longer accessible.
 11. The peer computing systemas recited in claim 1, wherein the plurality of peer nodes areconfigured to participate in a peer-to-peer environment on the networkin accordance with one or more peer-to-peer platform protocols forenabling the plurality of peer nodes to discover each other, communicatewith each other, and cooperate with each other to form peer groups andshare the network resources in the peer-to-peer environment.
 12. A peercomputing system, comprising: a plurality of peer nodes, wherein eachpeer node comprises a network interface configured to communicate withone or more other ones of said peer nodes over one or more networks, andwherein each peer node is configured to store advertisements to networkresources, wherein each network resource advertisement comprises aplurality of key/value pairs; a plurality of rendezvous nodes eachconfigured to: cache an index comprising one or more key/value pairsfrom one or more network resource advertisements stored on one or moreof the plurality of peer nodes local to the particular rendezvous node,wherein each key/value pair indicates a particular one of the local peernodes that a corresponding network resource advertisement is stored on;receive a query message from one of the plurality of peer nodes, whereinthe query message requests a particular network resource, and whereinthe query message includes one or more key/value pairs of anadvertisement for the particular network resource; perform a search ofthe cached index for matches to the one or more key/value pairs from thequery message; and if one or more matching key/value pairs is found inthe cached index, forward the query message to one or more of the localpeer nodes indicated by the matching key/value pairs.
 13. The peercomputing system as recited in claim 12, wherein the cached index is ahash table comprising hashes of the one or more key/value pairs from theone or more network resource advertisements, and wherein, to perform asearch of the cached index for matches to the one or more key/valuepairs from the query message, the particular rendezvous node is furtherconfigured to: hash the one or more key/value pairs from the querymessage; and compare the hashed one or more key/value pairs from thequery message to the one or more key/value pairs from the one or morenetwork resource advertisements.
 14. The peer computing system asrecited in claim 12, wherein, if one or more matching key/value pairs isfound in the cached index, said search returns a peer identifier foreach of the one or more of the local peer nodes indicated by thematching key/value pairs.
 15. The peer computing system as recited inclaim 1, wherein each of the plurality of rendezvous nodes is configuredto share the cached index with one or more others of the plurality ofrendezvous nodes.
 16. The peer computing system as recited in claim 12,wherein each of the one or more of the local peer nodes indicated by thematching key/value pairs is configured to: receive the query messageforwarded from the particular rendezvous node; and inform the one of theplurality of peer nodes that the local peer node stores an advertisementfor the particular network resource in response to the query message.17. The peer computing system as recited in claim 16, wherein the one ofthe plurality of peer nodes is configured to access the particularnetwork resource in accordance with the advertisement for the particularnetwork resource stored on one of the one or more of the local peernodes indicated by the matching key/value pairs.
 18. The peer computingsystem as recited in claim 12, wherein, if no matching key/value pair isfound in the cached index, the particular rendezvous node is furtherconfigured to forward the query message to at least one other of theplurality of rendezvous nodes comprising a different cached index ofkey/value pairs.
 19. The peer computing system as recited in claim 12,wherein the particular rendezvous node is further configured to: receiveone or more key/value pairs from at least one of the local peer nodes;and update the cached index with the received one or more key/valuepairs.
 20. The peer computing system as recited in claim 12, wherein theparticular rendezvous node is further configured to garbage collect thecached index to remove key/value pairs from network resourceadvertisements stored on local peer nodes that are no longer accessible.21. The peer computing system as recited in claim 12, wherein theplurality of peer nodes and the plurality of rendezvous nodes areconfigured to participate in a peer-to-peer environment on the networkin accordance with one or more peer-to-peer platform protocols forenabling the plurality of peer nodes to discover each other, communicatewith each other, discover the network resources, and cooperate with eachother to form peer groups and share the network resources in thepeer-to-peer environment.
 22. A peer node comprising: one or morenetwork interfaces for coupling to a network; a cached index comprisingone or more key/value pairs from one or more network resourceadvertisements stored on one or more other peer nodes on the network,wherein each key/value pair indicates a particular one of the other peernodes that a corresponding network resource advertisement is stored on;wherein the peer node is configured to: receive a query message fromanother peer node on the network, wherein the query message requests aparticular network resource, and wherein the query message includes oneor more key/value pairs of an advertisement for the particular networkresource; perform a search of the cached index for matches to the one ormore key/value pairs from the query message; and if a matching key/valuepair is found in the cached index, forward the query message to one ofthe one or more other peer nodes indicated by the matching key/valuepair.
 23. The peer node as recited in claim 22, wherein the cached indexis a hash table comprising hashes of the one or more key/value pairsfrom the one or more network resource advertisements, and wherein, toperform a search of the cached index for matches to the one or morekey/value pairs from the query message, the peer node is furtherconfigured to: hash the one or more key/value pairs from the querymessage; and compare the hashed one or more key/value pairs from thequery message to the one or more key/value pairs from the one or morenetwork resource advertisements.
 24. The peer node as recited in claim22, wherein, if a matching key/value pair is found in the cached index,said search returns a peer identifier for the one of the one or moreother peer nodes indicated by the matching key/value pair.
 25. The peernode as recited in claim 22, wherein the one of the plurality of peernodes is a rendezvous peer configured to: cache network resourceinformation including one or more indexes of key/value pairs; and assistother peer nodes on the network in discovery of the network resourcesusing the cached network resource information.
 26. The peer node asrecited in claim 22, further configured to provide the cached index toother peer nodes on the network.
 27. The peer node as recited in claim22, wherein, if no matching key/value pair is found in the cached index,the peer node is further configured to forward the query message to atleast one other peer node on the network comprising a different cachedindex of key/value pairs.
 28. The peer node as recited in claim 22,further configured to: receive one or more key/value pairs from anotherpeer node on the network; and update the cached index with the receivedone or more key/value pairs.
 29. The peer node as recited in claim 22,further configured to garbage collect the cached index to removekey/value pairs from network resource advertisements stored on peernodes that are no longer accessible.
 30. The peer node as recited inclaim 22, further configured to participate in a peer-to-peerenvironment with other peer nodes on the network in accordance with oneor more peer-to-peer platform protocols for enabling the peer nodes todiscover each other, communicate with each other, and cooperate witheach other to form peer groups and share the network resources in thepeer-to-peer environment.
 31. A method, comprising: receiving from apeer node a query message including one or more key/value pairs of anadvertisement for a particular network resource; searching for matchesto the one or more key/value pairs from the query message in a cachedindex comprising one or more key/value pairs from one or more networkresource advertisements stored on other peer nodes, wherein eachkey/value pair in the cached index indicates a particular one of theother peer nodes that a corresponding network resource advertisement isstored on; and if one or more matching key/value pairs is found in thecached index, forwarding the query message to one or more of the otherpeer nodes indicated by the matching key/value pairs.
 32. The method asrecited in claim 31, wherein the cached index is a hash table comprisinghashes of the one or more key/value pairs from the one or more networkresource advertisements, and wherein searching for matches to the one ormore key/value pairs from the query message in a cached index comprises:hashing the one or more key/value pairs from the query message; andcomparing the hashed one or more key/value pairs from the query messageto the one or more key/value pairs from the one or more network resourceadvertisements.
 33. The method as recited in claim 31, wherein, if oneor more matching key/value pairs is found in the cached index, saidsearching returns a peer identifier for each of the one or more of theother peer nodes indicated by the matching key/value pairs.
 34. Themethod as recited in claim 31, wherein said receiving, said searching,and said forwarding are performed by a rendezvous peer participating ina peer-to-peer networking environment implemented in accordance with oneor more peer-to-peer platform protocol for enabling peer nodes todiscover each other, communicate with each other, and cooperate witheach other to form peer groups and share the network resources in thepeer-to-peer environment.
 35. The method as recited in claim 34, furthercomprising the rendezvous peer providing the cached index to anotherrendezvous peer.
 36. The method as recited in claim 31 furthercomprising: each of the one or more of the other peer nodes indicated bythe matching key/value pairs receiving the forwarded query message; andeach of the one or more of the other peer nodes indicated by thematching key/value pairs informing the peer node that originated thequery message that the peer node that received the forwarded querymessage stores an advertisement for the particular network resource inresponse to the query message.
 37. The method as recited in claim 36,further comprising the peer node that originated the query messageaccessing the particular network resource in accordance with theadvertisement for the particular network resource stored on one or moreof the other peer nodes indicated by the matching key/value pairs. 38.The method as recited in claim 31, further comprising, if no matchingkey/value pair is found in the cached index, forwarding the querymessage to at least one other peer node comprising a different cachedindex of key/value pairs.
 39. The method as recited in claim 1, furthercomprising: receiving one or more key/value pairs from another peernode; and updating the cached index with the received one or morekey/value pairs.
 40. The method as recited in claim 31, furthercomprising garbage collecting the cached index to remove key/value pairsfrom network resource advertisements stored on peer nodes that are nolonger accessible.
 41. A computer-accessible medium comprising programinstructions, wherein the program instructions are configured toimplement: receiving from a peer node a query message including one ormore key/value pairs of an advertisement for a particular networkresource; searching for matches to the one or more key/value pairs fromthe query message in a cached index comprising one or more key/valuepairs from one or more network resource advertisements stored on otherpeer nodes, wherein each key/value pair in the cached index indicates aparticular one of the other peer nodes that a corresponding networkresource advertisement is stored on; and if one or more matchingkey/value pairs is found in the cached index, forwarding the querymessage to one or more of the other peer nodes indicated by the matchingkey/value pairs.
 42. The computer-accessible medium as recited in claim41, wherein the cached index is a hash table comprising hashes of theone or more key/value pairs from the one or more network resourceadvertisements, and wherein, in said searching for matches to the one ormore key/value pairs from the query message in a cached index, theprogram instructions are further configured to implement: hashing theone or more key/value pairs from the query message; and comparing thehashed one or more key/value pairs from the query message to the one ormore key/value pairs from the one or more network resourceadvertisements.
 43. The computer-accessible medium as recited in claim41, wherein, if one or more matching key/value pairs is found in thecached index, said searching returns a peer identifier for each of theone or more of the other peer nodes indicated by the matching key/valuepairs.
 44. The computer-accessible medium as recited in claim 41,wherein said receiving, said searching, and said forwarding areperformed by a rendezvous peer participating in a peer-to-peernetworking environment implemented in accordance with one or morepeer-to-peer platform protocol for enabling peer nodes to discover eachother, communicate with each other, and cooperate with each other toform peer groups and share the network resources in the peer-to-peerenvironment.
 45. The computer-accessible medium as recited in claim 44,wherein the program instructions are further configured to implement therendezvous peer providing the cached index to another rendezvous peer.46. The computer-accessible medium as recited in claim 41 wherein theprogram instructions are further configured to implement: each of theone or more of the other peer nodes indicated by the matching key/valuepairs receiving the forwarded query message; and each of the one or moreof the other peer nodes indicated by the matching key/value pairsinforming the peer node that originated the query message that the peernode that received the forwarded query message stores an advertisementfor the particular network resource in response to the query message.47. The computer-accessible medium as recited in claim 46, wherein theprogram instructions are further configured to implement the peer nodethat originated the query message accessing the particular networkresource in accordance with the advertisement for the particular networkresource stored on one or more of the other peer nodes indicated by thematching key/value pairs.
 48. The computer-accessible medium as recitedin claim 41, wherein the program instructions are further configured toimplement, if no matching key/value pair is found in the cached index,forwarding the query message to at least one other peer node comprisinga different cached index of key/value pairs.
 49. The computer-accessiblemedium as recited in claim 41, wherein the program instructions arefurther configured to implement: receiving one or more key/value pairsfrom another peer node; and updating the cached index with the receivedone or more key/value pairs.
 50. The computer-accessible medium asrecited in claim 41, wherein the program instructions are furtherconfigured to implement garbage collecting the cached index to removekey/value pairs from network resource advertisements stored on peernodes that are no longer accessible.